|
| 1 | +# Configuration |
| 2 | + |
| 3 | +## Provider Spec |
| 4 | + |
| 5 | +1. `ProviderSpec`: desired state of the Provider, consisting of: |
| 6 | + - Version (string): provider version (e.g., "v0.1.0") |
| 7 | + - Manager (optional ManagerSpec): controller manager properties for the provider |
| 8 | + - Deployment (optional DeploymentSpec): deployment properties for the provider |
| 9 | + - ConfigSecret (optional SecretReference): reference to the config secret |
| 10 | + - FetchConfig (optional FetchConfiguration): how the operator will fetch components and metadata |
| 11 | + |
| 12 | + YAML example: |
| 13 | + |
| 14 | + ```yaml |
| 15 | + ... |
| 16 | + spec: |
| 17 | + version: "v0.1.0" |
| 18 | + manager: |
| 19 | + maxConcurrentReconciles: 5 |
| 20 | + deployment: |
| 21 | + replicas: 1 |
| 22 | + configSecret: |
| 23 | + name: "provider-secret" |
| 24 | + fetchConfig: |
| 25 | + url: "https://github.com/owner/repo/releases" |
| 26 | + ... |
| 27 | + ``` |
| 28 | + |
| 29 | +2. `ManagerSpec`: controller manager properties for the provider, consisting of: |
| 30 | + - ProfilerAddress (optional string): pprof profiler bind address (e.g., "localhost:6060") |
| 31 | + - MaxConcurrentReconciles (optional int): maximum number of concurrent reconciles |
| 32 | + - Verbosity (optional int): logs verbosity |
| 33 | + - FeatureGates (optional map[string]bool): provider specific feature flags |
| 34 | + |
| 35 | + YAML example: |
| 36 | + |
| 37 | + ```yaml |
| 38 | + ... |
| 39 | + spec: |
| 40 | + manager: |
| 41 | + profilerAddress: "localhost:6060" |
| 42 | + maxConcurrentReconciles: 5 |
| 43 | + verbosity: 1 |
| 44 | + featureGates: |
| 45 | + FeatureA: true |
| 46 | + FeatureB: false |
| 47 | + ... |
| 48 | + ``` |
| 49 | + |
| 50 | +3. `DeploymentSpec`: deployment properties for the provider, consisting of: |
| 51 | + - Replicas (optional int): number of desired pods |
| 52 | + - NodeSelector (optional map[string]string): node label selector |
| 53 | + - Tolerations (optional []corev1.Toleration): pod tolerations |
| 54 | + - Affinity (optional corev1.Affinity): pod scheduling constraints |
| 55 | + - Containers (optional []ContainerSpec): list of deployment containers |
| 56 | + - ServiceAccountName (optional string): pod service account |
| 57 | + - ImagePullSecrets (optional []corev1.LocalObjectReference): list of image pull secrets specified in the Deployment |
| 58 | + |
| 59 | + YAML example: |
| 60 | + |
| 61 | + ```yaml |
| 62 | + ... |
| 63 | + spec: |
| 64 | + deployment: |
| 65 | + replicas: 2 |
| 66 | + nodeSelector: |
| 67 | + disktype: ssd |
| 68 | + tolerations: |
| 69 | + - key: "example" |
| 70 | + operator: "Exists" |
| 71 | + effect: "NoSchedule" |
| 72 | + affinity: |
| 73 | + nodeAffinity: |
| 74 | + requiredDuringSchedulingIgnoredDuringExecution: |
| 75 | + nodeSelectorTerms: |
| 76 | + - matchExpressions: |
| 77 | + - key: "example" |
| 78 | + operator: "In" |
| 79 | + values: |
| 80 | + - "true" |
| 81 | + containers: |
| 82 | + - name: "containerA" |
| 83 | + imageUrl: "example.com/repo/image-name:v1.0.0" |
| 84 | + args: |
| 85 | + exampleArg: "value" |
| 86 | + ... |
| 87 | + ``` |
| 88 | + |
| 89 | +4. `ContainerSpec`: container properties for the provider, consisting of: |
| 90 | + - Name (string): container name |
| 91 | + - ImageURL (optional string): container image URL |
| 92 | + - Args (optional map[string]string): extra provider specific flags |
| 93 | + - Env (optional []corev1.EnvVar): environment variables |
| 94 | + - Resources (optional corev1.ResourceRequirements): compute resources |
| 95 | + - Command (optional []string): override container's entrypoint array |
| 96 | + |
| 97 | + YAML example: |
| 98 | + |
| 99 | + ```yaml |
| 100 | + ... |
| 101 | + spec: |
| 102 | + deployment: |
| 103 | + containers: |
| 104 | + - name: "example-container" |
| 105 | + imageUrl: "example.com/repo/image-name:v1.0.0" |
| 106 | + args: |
| 107 | + exampleArg: "value" |
| 108 | + env: |
| 109 | + - name: "EXAMPLE_ENV" |
| 110 | + value: "example-value" |
| 111 | + resources: |
| 112 | + limits: |
| 113 | + cpu: "1" |
| 114 | + memory: "1Gi" |
| 115 | + requests: |
| 116 | + cpu: "500m" |
| 117 | + memory: "500Mi" |
| 118 | + command: |
| 119 | + - "/bin/bash" |
| 120 | + ... |
| 121 | + ``` |
| 122 | + |
| 123 | +5. `FetchConfiguration`: components and metadata fetch options, consisting of: |
| 124 | + - URL (optional string): URL for remote Github repository releases (e.g., "<https://github.com/owner/repo/releases>") |
| 125 | + - Selector (optional metav1.LabelSelector): label selector to use for fetching provider components and metadata from ConfigMaps stored in the cluster |
| 126 | + |
| 127 | + YAML example: |
| 128 | + |
| 129 | + ```yaml |
| 130 | + ... |
| 131 | + spec: |
| 132 | + fetchConfig: |
| 133 | + url: "https://github.com/owner/repo/releases" |
| 134 | + selector: |
| 135 | + matchLabels: |
| 136 | + ... |
| 137 | + ``` |
| 138 | + |
| 139 | +6. `SecretReference`: pointer to a secret object, consisting of: |
| 140 | + |
| 141 | +- Name (string): name of the secret |
| 142 | +- Namespace (optional string): namespace of the secret, defaults to the provider object namespace |
| 143 | + |
| 144 | + YAML example: |
| 145 | + |
| 146 | + ```yaml |
| 147 | + ... |
| 148 | + spec: |
| 149 | + configSecret: |
| 150 | + name: capa-secret |
| 151 | + namespace: capa-system |
| 152 | + ... |
| 153 | + ``` |
0 commit comments