Skip to content

Commit 3552380

Browse files
committed
chore: add spiffe defaults to Helm values, remove static templates
Add spiffe section with helperConfig to Helm values.yaml under defaults. Delete static spiffe-helper-config.yaml template and OpenShift spiffe-helper-keycloak.yaml kustomize patch. Update kustomization references and e2e fixture comments. RHAIENG-4939 Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Ian Miller <milleryan2003@gmail.com>
1 parent 6ed1ac4 commit 3552380

6 files changed

Lines changed: 27 additions & 53 deletions

File tree

charts/kagenti-operator/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,21 @@ defaults:
253253
limits:
254254
cpu: 300m
255255
memory: 384Mi
256+
257+
# SPIFFE / spiffe-helper settings.
258+
# Keep helperConfig in sync with DefaultSpiffeHelperConfig in internal/webhook/config/defaults.go.
259+
spiffe:
260+
trustDomain: cluster.local
261+
socketPath: "unix:///spiffe-workload-api/spire-agent.sock"
262+
helperConfig: |
263+
agent_address = "/spiffe-workload-api/spire-agent.sock"
264+
cmd = ""
265+
cmd_args = ""
266+
svid_file_name = "/opt/svid.pem"
267+
svid_key_file_name = "/opt/svid_key.pem"
268+
svid_bundle_file_name = "/opt/svid_bundle.pem"
269+
cert_file_mode = 0644
270+
key_file_mode = 0640
271+
jwt_svids = [{jwt_audience="http://keycloak.localtest.me:8080/realms/kagenti", jwt_svid_file_name="/opt/jwt_svid.token"}]
272+
jwt_svid_file_mode = 0644
273+
include_federated_domains = true
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
resources:
22
- authbridge-runtime-config.yaml
33
- envoy-config.yaml
4-
- spiffe-helper-config.yaml

kagenti-operator/config/authbridge/spiffe-helper-config.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

kagenti-operator/config/openshift/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ resources:
1212

1313
patches:
1414
- path: patches/authbridge-keycloak.yaml
15-
- path: patches/spiffe-helper-keycloak.yaml

kagenti-operator/config/openshift/patches/spiffe-helper-keycloak.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

kagenti-operator/test/e2e/fixtures.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -833,11 +833,11 @@ spec:
833833

834834
// --- AuthBridge Injection E2E fixtures ---
835835

836-
// authBridgeConfigMapFixture returns YAML for the 4 ConfigMaps required by
837-
// the auth bridge webhook: authbridge-config, authbridge-runtime-config, spiffe-helper-config, envoy-config.
838-
// Only the mandatory keys are set (ISSUER, KEYCLOAK_URL, KEYCLOAK_REALM, TOKEN_URL,
839-
// DEFAULT_OUTBOUND_POLICY). The operator reads additional optional keys
840-
// (EXPECTED_AUDIENCE, TARGET_AUDIENCE, SPIRE_ENABLED, etc.) which default to empty.
836+
// authBridgeConfigMapFixture returns YAML for the ConfigMaps required by
837+
// the auth bridge webhook: authbridge-config, spiffe-helper-config, envoy-config,
838+
// and authbridge-runtime-config. Note: in production, spiffe-helper-config is
839+
// derived from PlatformConfig by the controller; here it's created directly for
840+
// e2e test setup before the controller reconciles.
841841
func authBridgeConfigMapFixture() string {
842842
return `apiVersion: v1
843843
kind: ConfigMap
@@ -1231,9 +1231,11 @@ spec:
12311231
`
12321232
}
12331233

1234-
// combinedConfigMapFixture returns YAML for the 4 AuthBridge ConfigMaps
1234+
// combinedConfigMapFixture returns YAML for the AuthBridge ConfigMaps
12351235
// (authbridge-config, spiffe-helper-config, envoy-config, authbridge-runtime-config)
1236-
// scoped to the combined test namespace.
1236+
// scoped to the combined test namespace. Note: spiffe-helper-config is created
1237+
// directly here for e2e setup; in production, the controller derives it from
1238+
// PlatformConfig.
12371239
func combinedConfigMapFixture() string {
12381240
return `apiVersion: v1
12391241
kind: ConfigMap

0 commit comments

Comments
 (0)