You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/charts/discovery-agent/README.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The Discovery Agent connects your Kubernetes or OpenShift cluster to Palo Alto N
12
12
> ""
13
13
> ```
14
14
15
-
The TSG (Tenant Service Group) ID to use when connecting to SCM. The production SCM server URL is derived from this value. Required unless config.serverURL is set. Mutually exclusive with config.serverURL.
15
+
The TSG (Tenant Service Group) ID to use when connecting to SCM. The production SCM server URL is derived from this value. Required unless config.serverURL is set. Mutually exclusive with config.serverURL. Must not be set when config.venafiConnection.enabled is true (the TSG ID is taken from the VenafiConnection's `spec.ngts` instead).
Deprecated: Client ID for the configured service account. The client ID should be provided in the "clientID" field of the authentication secret (see config.secretName). This field is provided for compatibility for users migrating from the "venafi-kubernetes-agent" chart.
75
+
Deprecated: Client ID for the configured service account. The client ID should be provided in the "clientID" field of the authentication secret (see config.secretName). This field is provided for compatibility for users migrating from the "venafi-kubernetes-agent" chart. Must not be set when config.venafiConnection.enabled is true.
76
76
77
77
#### **config.secretName** ~ `string`
78
78
> Default value:
@@ -84,8 +84,30 @@ The name of the Secret containing the NGTS built-in service account credentials.
84
84
The Secret must contain the following key:
85
85
- privatekey.pem: PEM-encoded private key for the service account
86
86
The Secret should also contain the following key:
87
-
- clientID: Service account client ID (config.clientID must be set if not present)
87
+
- clientID: Service account client ID (config.clientID must be set if not present)
88
+
Must not be set when config.venafiConnection.enabled is true (the credentials Secret is not mounted in that mode).
88
89
90
+
#### **config.venafiConnection.enabled** ~ `bool`
91
+
> Default value:
92
+
> ```yaml
93
+
> false
94
+
> ```
95
+
96
+
When set to true, config.tsgID, config.serverURL, config.clientID and config.clientId must not be set (the chart will fail to render otherwise), and the Secret named by config.secretName will _not_ be mounted into the Discovery Agent Pod.
97
+
#### **config.venafiConnection.name** ~ `string`
98
+
> Default value:
99
+
> ```yaml
100
+
> venafi-components
101
+
> ```
102
+
103
+
The name of a VenafiConnection resource which contains the configuration for authenticating to the upload backend.
Copy file name to clipboardExpand all lines: deploy/charts/discovery-agent/templates/deployment.yaml
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,27 @@ spec:
71
71
- "agent"
72
72
- "-c"
73
73
- "/etc/discovery-agent/config.yaml"
74
+
{{- if .Values.config.venafiConnection.enabled }}
75
+
{{- if .Values.config.tsgID }}
76
+
{{- fail "config.tsgID must not be set when config.venafiConnection.enabled is true; the TSG ID is read from the VenafiConnection's spec.ngts" }}
77
+
{{- end }}
78
+
{{- if .Values.config.serverURL }}
79
+
{{- fail "config.serverURL must not be set when config.venafiConnection.enabled is true; the server URL is read from the VenafiConnection's spec" }}
80
+
{{- end }}
81
+
{{- if .Values.config.clientID }}
82
+
{{- fail "config.clientID must not be set when config.venafiConnection.enabled is true; authentication is performed via the VenafiConnection resource" }}
83
+
{{- end }}
84
+
{{- if .Values.config.clientId }}
85
+
{{- fail "config.clientId must not be set when config.venafiConnection.enabled is true; authentication is performed via the VenafiConnection resource" }}
86
+
{{- end }}
87
+
{{- if ne .Values.config.secretName "discovery-agent-credentials" }}
88
+
{{- fail "config.secretName must not be set when config.venafiConnection.enabled is true; the credentials Secret is not mounted in this mode (authentication is performed via the VenafiConnection resource)" }}
errorMessage: "config.clientID must not be set when config.venafiConnection.enabled is true; authentication is performed via the VenafiConnection resource"
errorMessage: "config.clientId must not be set when config.venafiConnection.enabled is true; authentication is performed via the VenafiConnection resource"
485
+
486
+
- it: VenafiConnection mode rejects a non-default config.secretName
487
+
set:
488
+
config.clusterName: test-cluster
489
+
config.secretName: custom-credentials-secret
490
+
config.venafiConnection.enabled: true
491
+
template: deployment.yaml
492
+
asserts:
493
+
- failedTemplate:
494
+
errorMessage: "config.secretName must not be set when config.venafiConnection.enabled is true; the credentials Secret is not mounted in this mode (authentication is performed via the VenafiConnection resource)"
495
+
496
+
- it: VenafiConnection mode accepts the default config.secretName
"description": "Deprecated: Client ID for the configured service account. The client ID should be provided in the \"clientID\" field of the authentication secret (see config.secretName). This field is provided for compatibility for users migrating from the \"venafi-kubernetes-agent\" chart.",
143
+
"description": "Deprecated: Client ID for the configured service account. The client ID should be provided in the \"clientID\" field of the authentication secret (see config.secretName). This field is provided for compatibility for users migrating from the \"venafi-kubernetes-agent\" chart. Must not be set when config.venafiConnection.enabled is true.",
141
144
"type": "string"
142
145
},
143
146
"helm-values.config.clientId": {
144
147
"default": "",
145
-
"description": "Deprecated: Client ID for the configured service account (alternative to clientID). The client ID should be provided in the \"clientID\" field of the authentication secret (see config.secretName). This field is provided for compatibility for users migrating from the \"venafi-kubernetes-agent\" chart. If both clientID and clientId are set, clientID takes precedence.",
148
+
"description": "Deprecated: Client ID for the configured service account (alternative to clientID). The client ID should be provided in the \"clientID\" field of the authentication secret (see config.secretName). This field is provided for compatibility for users migrating from the \"venafi-kubernetes-agent\" chart. If both clientID and clientId are set, clientID takes precedence. Must not be set when config.venafiConnection.enabled is true.",
146
149
"type": "string"
147
150
},
148
151
"helm-values.config.clusterDescription": {
@@ -173,17 +176,47 @@
173
176
},
174
177
"helm-values.config.secretName": {
175
178
"default": "discovery-agent-credentials",
176
-
"description": "The name of the Secret containing the NGTS built-in service account credentials.\nThe Secret must contain the following key:\n- privatekey.pem: PEM-encoded private key for the service account\nThe Secret should also contain the following key:\n- clientID: Service account client ID (config.clientID must be set if not present)",
179
+
"description": "The name of the Secret containing the NGTS built-in service account credentials.\nThe Secret must contain the following key:\n- privatekey.pem: PEM-encoded private key for the service account\nThe Secret should also contain the following key:\n- clientID: Service account client ID (config.clientID must be set if not present)\nMust not be set when config.venafiConnection.enabled is true (the credentials Secret is not mounted in that mode).",
177
180
"type": "string"
178
181
},
179
182
"helm-values.config.serverURL": {
180
183
"default": "",
181
-
"description": "Explicit SCM server URL (optional).\nIf not set, the production SCM server URL is derived from config.tsgID. This value is intended for development purposes only and should not be set in production.\nMutually exclusive with config.tsgID.",
184
+
"description": "Explicit SCM server URL (optional).\nIf not set, the production SCM server URL is derived from config.tsgID. This value is intended for development purposes only and should not be set in production.\nMutually exclusive with config.tsgID.\nMust not be set when config.venafiConnection.enabled is true.",
182
185
"type": "string"
183
186
},
184
187
"helm-values.config.tsgID": {
185
188
"default": "",
186
-
"description": "The TSG (Tenant Service Group) ID to use when connecting to SCM. The production SCM server URL is derived from this value. Required unless config.serverURL is set. Mutually exclusive with config.serverURL."
189
+
"description": "The TSG (Tenant Service Group) ID to use when connecting to SCM. The production SCM server URL is derived from this value. Required unless config.serverURL is set. Mutually exclusive with config.serverURL. Must not be set when config.venafiConnection.enabled is true (the TSG ID is taken from the VenafiConnection's `spec.ngts` instead)."
"description": "When set to true, config.tsgID, config.serverURL, config.clientID and config.clientId must not be set (the chart will fail to render otherwise), and the Secret named by config.secretName will _not_ be mounted into the Discovery Agent Pod.",
209
+
"type": "boolean"
210
+
},
211
+
"helm-values.config.venafiConnection.name": {
212
+
"default": "venafi-components",
213
+
"description": "The name of a VenafiConnection resource which contains the configuration for authenticating to the upload backend.",
0 commit comments