Skip to content

Commit

Permalink
Add cost-management prod external secret (#5663)
Browse files Browse the repository at this point in the history
* Fix adding of secrets to staging instance

* Add cost-management production external secret

This is required to enable access to production Konflux clusters data
via service account.

---------

Co-authored-by: rrajashe <rrajashe@redhat.com>
  • Loading branch information
raks-tt and rrajashe authored Feb 26, 2025
1 parent 6c9eb08 commit 7ba9bec
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 7 deletions.
1 change: 1 addition & 0 deletions components/cost-management/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Kustomization
resources:
- costmanagement-metrics-operator.yaml
- costmanagement-metrics-config.yaml
- external-service-account-secret.yaml

commonAnnotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- op: add
path: /spec/dataFrom/0/extract/key
value: production/cost-management/konflux-service-account
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-ocp-p01
value: kflux-ocp-p01
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-prd-es01
value: kflux-prd-es01
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account
12 changes: 12 additions & 0 deletions components/cost-management/production/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base

patches:
- path: cost-mangement-external-secret-patch.yaml
target:
name: konflux-service-account
kind: ExternalSecret
group: external-secrets.io
version: v1beta1
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-prd-host1
value: stone-prd-host1
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-prd-rh01
value: stone-prd-rh01
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-prd-rh02
value: stone-prd-rh02
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-prod-p01
value: stone-prod-p01
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- op: add
path: /spec/source/name
value: konflux-prod-p02
value: stone-prod-p02
- op: replace
path: /spec/authentication/type
value: service-account
- op: add
path: /spec/authentication/secret_name
value: konflux-service-account

0 comments on commit 7ba9bec

Please sign in to comment.