Configurations
Configure the Kubernetes Clusters import
Intro
The import of each KubernetesCluster can be configured with some specific parameters using the .spec.config attribute.
apiVersion: assets.astronetes.io/v1alpha1
kind: KubernetesCluster
metadata:
name: my-cluster
spec:
secretName: my-cluster-secret
config: {}
Limit assigned resources
For each Kubernetes Cluster imported, a new Pod is deployed inside the same Namespace. The limit and requestsresources can be set using the.spec.config.resources` field.
Example:
apiVersion: assets.astronetes.io/v1alpha1
kind: KubernetesCluster
metadata:
name: my-cluster
spec:
secretName: my-cluster-secret
config:
resources:
requests:
cpu: 1
memory: 2Gi
limits:
cpu: 2
memory: 2Gi
Filter the watched resources
By default, the operator will watch all the available resources int he cluster that can be watched. You can filter the list of this resources by configuring the .spec.config.selectors field.
Example:
apiVersion: assets.astronetes.io/v1alpha1
kind: KubernetesCluster
metadata:
name: my-cluster
spec:
secretName: my-cluster-secret
config:
selectors:
targets:
- group: ""
version: v1
resources:
- namespaces
- secrets
- configmaps
- serviceaccounts
- resourcequotas
- limitranges
- persistentvolumeclaims
- group: policy
version: v1
resources:
- poddisruptionbudgets
Concurrency
The concurrency parameter can be used to improve the peformance of the operator on listening the changes that happens in the Kubernetes Cluster.
Example:
apiVersion: assets.astronetes.io/v1alpha1
kind: KubernetesCluster
metadata:
name: my-cluster
spec:
secretName: my-cluster-secret
config:
concurrency: 200