-
Notifications
You must be signed in to change notification settings - Fork 22
ESO-541,ESO-551:Adds API changes for concurrent flag, replicas, and experimentalOverrides #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ import ( | |
| corev1 "k8s.io/api/core/v1" | ||
| networkingv1 "k8s.io/api/networking/v1" | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| "k8s.io/apimachinery/pkg/runtime" | ||
| ) | ||
|
|
||
| func init() { | ||
|
|
@@ -191,6 +192,16 @@ type ComponentConfig struct { | |
| // +listMapKey=name | ||
| // +optional | ||
| OverrideEnv []corev1.EnvVar `json:"overrideEnv,omitempty"` | ||
|
|
||
| // advancedOverrides applies raw patches on top of the final operator generated Deployment spec. | ||
| // WARNING: DO NOT USE UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING. | ||
| // This field can overwrite your own first-class CRD settings. You must NOT use this | ||
| // field to add or modify containers, initContainers, or ports, as doing so breaks | ||
| // the structural integrity of the operand and will fail deployment reconciliation. | ||
| // Only the allowlisted paths are applied. | ||
| // +kubebuilder:validation:Optional | ||
| // +kubebuilder:pruning:PreserveUnknownFields | ||
| AdvancedOverrides *runtime.RawExtension `json:"advancedOverrides,omitempty"` | ||
| } | ||
|
|
||
| // DeploymentConfig defines configuration overrides for a Kubernetes Deployment resource. | ||
|
|
@@ -204,6 +215,14 @@ type DeploymentConfig struct { | |
| // +kubebuilder:validation:Maximum=50 | ||
| // +optional | ||
| RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` | ||
|
|
||
| // replicas sets the desired replica count for this component's Deployment. | ||
| // When omitted, defaults to 1. For ExternalSecretsCoreController, replicas > 1 enables --enable-leader-election. | ||
| // +kubebuilder:default:=1 | ||
| // +kubebuilder:validation:Minimum:=1 | ||
| // +kubebuilder:validation:Maximum:=10 | ||
| // +optional | ||
| Replicas *int32 `json:"replicas,omitempty"` | ||
|
Comment on lines
+218
to
+225
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Apply The current 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| // BitwardenSecretManagerProvider is for enabling the bitwarden secrets manager provider and for setting up the additional service required for connecting with the bitwarden server. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,7 @@ _Appears in:_ | |
| | `componentName` _[ComponentName](#componentname)_ | componentName identifies which external-secrets component this configuration applies to.<br />Valid component names: ExternalSecretsCoreController, Webhook, CertController, BitwardenSDKServer. | | Enum: [ExternalSecretsCoreController Webhook CertController BitwardenSDKServer] <br /> | | ||
| | `deploymentConfigs` _[DeploymentConfig](#deploymentconfig)_ | deploymentConfigs specifies overrides for the Kubernetes Deployment resource of this component. | | | | ||
| | `overrideEnv` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#envvar-v1-core) array_ | overrideEnv specifies custom environment variables for this component's container. These are merged with operator-managed environment variables, with user-defined values taking precedence.<br />Names starting with 'KUBERNETES_' or 'EXTERNAL_SECRETS_' are reserved prefixes and will be rejected.<br />The exact names 'HOSTNAME', 'SSL_CERT_DIR', and 'SSL_CERT_FILE' are also reserved. | | MaxItems: 50 <br /> | | ||
| | `advancedOverrides` _[RawExtension](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#rawextension-runtime-pkg)_ | advancedOverrides applies raw patches on top of the final operator generated Deployment spec.<br />WARNING: DO NOT USE UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING.<br />This field can overwrite your own first-class CRD settings. You must NOT use this<br />field to add or modify containers, initContainers, or ports, as doing so breaks<br />the structural integrity of the operand and will fail deployment reconciliation.<br />Only the allowlisted paths are applied. | | Optional: \{\} <br /> | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Use the compound modifier Change “operator generated Deployment spec” to “operator-generated Deployment spec” in the API reference. 🧰 Tools🪛 LanguageTool[grammar] ~133-~133: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
|
|
||
| #### ComponentName | ||
|
|
@@ -256,6 +257,7 @@ _Appears in:_ | |
| | Field | Description | Default | Validation | | ||
| | --- | --- | --- | --- | | ||
| | `revisionHistoryLimit` _integer_ | revisionHistoryLimit specifies the number of old ReplicaSets to retain for rollback purposes.<br />This allows rolling back to previous deployment versions using 'kubectl rollout undo'.<br />Must be at least 1 to ensure rollback capability. Maximum value is 50 to limit resource usage.<br />If not specified, defaults to 10. | 10 | Maximum: 50 <br />Minimum: 1 <br /> | | ||
| | `replicas` _integer_ | replicas sets the desired replica count for this component's Deployment.<br />When omitted, defaults to 1. For ExternalSecretsCoreController, replicas > 1 enables --enable-leader-election. | 1 | Maximum: 10 <br />Minimum: 1 <br /> | | ||
|
|
||
|
|
||
| #### ExternalSecretsConfig | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/external-secrets-operator
Length of output: 50392
🏁 Script executed:
Repository: openshift/external-secrets-operator
Length of output: 3182
🏁 Script executed:
Repository: openshift/external-secrets-operator
Length of output: 50391
🏁 Script executed:
Repository: openshift/external-secrets-operator
Length of output: 50391
🏁 Script executed:
Repository: openshift/external-secrets-operator
Length of output: 9696
🏁 Script executed:
Repository: openshift/external-secrets-operator
Length of output: 1694
Remove or implement
AdvancedOverrides.AdvancedOverridesis accepted by the CRD, butapplyUserDeploymentConfigsnever reads it. Configured patches are silently ignored. If implemented, validate patch paths with an allow-list before applying them.🤖 Prompt for AI Agents
Source: Path instructions