Skip to content

Commit

Permalink
Add eso to all remainings clusters.
Browse files Browse the repository at this point in the history
This change will deploy ESO to all clusters (save for smaug which
already has it). And set up an initial secret store for the namespace
openshift-monitoring, as a means to confirm it works and also as a set
up for a future addition of slack alerting support (the slack api url
will need to be fetched by eso from vault for all clusters).
  • Loading branch information
HumairAK committed May 19, 2022
1 parent 988c09b commit 197bfbd
Show file tree
Hide file tree
Showing 49 changed files with 289 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: eso-tokenreview
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: eso-vault-auth
namespace: external-secrets-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: Kustomization

resources:
- ../../base/core/namespaces/external-secrets-operator
- ../../base/rbac.authorization.k8s.io/clusterrolebindings/eso-tokenreview
- ../../base/operators.coreos.com/subscriptions/external-secrets-operator
3 changes: 3 additions & 0 deletions cluster-scope/overlays/prod/emea/balrog/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ resources:
- ../../../../base/rbac.authorization.k8s.io/clusterrolebindings/cluster-reader-k8s-annotations-exporter
- ../../../../base/user.openshift.io/groups/cluster-admins
- ../../../../bundles/acme-operator
- ../../../../bundles/external-secrets-operator
- apiserver
- machineautoscalers.yaml
- ingresscontrollers
- secrets
- secretstores
- serviceaccounts
generators:
- secret-generator.yaml
patchesStrategicMerge:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: balrog-k8s
role: emea-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
3 changes: 3 additions & 0 deletions cluster-scope/overlays/prod/emea/morty/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ resources:
- ../../../../base/rbac.authorization.k8s.io/clusterrolebindings/sudoers
- ../../../../base/user.openshift.io/groups/cluster-admins
- ../../../../base/user.openshift.io/groups/sudoers
- ../../../../bundles/external-secrets-operator
- ../../../../bundles/nfd
- ../common
- apiserver/api_server_cert.yaml
- ingresscontrollers/default.yaml
- secrets
- secretstores
- serviceaccounts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: morty-k8s
role: emea-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
3 changes: 3 additions & 0 deletions cluster-scope/overlays/prod/emea/rick/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ resources:
- ../../../../base/user.openshift.io/groups/cluster-admins
- ../../../../base/storage.k8s.io/storageclasses/ocs-storagecluster-cephfs
- ../../../../bundles/acme-operator
- ../../../../bundles/external-secrets-operator
- ../../../../bundles/nfd
- clusterversion.yaml
- secrets
- secretstores
- serviceaccounts

generators:
- secret-generator.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: rick-k8s
role: emea-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
5 changes: 3 additions & 2 deletions cluster-scope/overlays/prod/moc/curator/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ resources:
- ../../../../base/rbac.authorization.k8s.io/clusterrolebindings/cluster-admins-rb
- ../../../../base/storage.k8s.io/storageclasses/hostpath-provisioner
- ../../../../base/user.openshift.io/groups/cluster-admins

- ../../../../bundles/external-secrets-operator
- machineconfigs/50-ipmi-route.yaml
- configmaps/admin-acks.yaml

- secretstores
- serviceaccounts
generators:
- secret-generator.yaml

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: curator-k8s
role: moc-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
4 changes: 3 additions & 1 deletion cluster-scope/overlays/prod/moc/infra/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ resources:
- ../../../../base/storage.k8s.io/storageclasses/moc-nfs-csi
- ../../../../base/user.openshift.io/groups/cluster-admins
- ../../../../bundles/acme-operator
- ../../../../bundles/external-secrets-operator
- ../../../../bundles/idp-mgmt-operator
- apiserver/api_server_cert.yaml
- clusterversion.yaml
Expand All @@ -53,7 +54,8 @@ resources:
- nodenetworkconfigurationpolicies/zero-provisioning-vlan.yaml
- oauth
- secrets

- secretstores
- serviceaccounts
generators:
- secret-generator.yaml

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: infra-k8s
role: moc-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-secret-fetcher.yaml
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
3 changes: 3 additions & 0 deletions cluster-scope/overlays/prod/osc/osc-cl1/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ resources:
- ../../../../base/user.openshift.io/groups/pachyderm-admins
- ../../../../base/user.openshift.io/groups/seldon-admin
- ../../../../base/user.openshift.io/groups/sostrades
- ../../../../bundles/external-secrets-operator
- ../../../../bundles/opendatahub-operator-manual
- ../../../../bundles/training-operator
- ../../../../bundles/openshift-pipelines
- apiserver
- ingresscontroller
- secretstores
- serviceaccounts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: osc-cl1-k8s
role: osc-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
4 changes: 3 additions & 1 deletion cluster-scope/overlays/prod/osc/osc-cl2/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ resources:
- ../../../../base/user.openshift.io/groups/odh-users
- ../../../../base/user.openshift.io/groups/pachyderm-admins
- ../../../../base/user.openshift.io/groups/seldon-admin
- ../../../../bundles/external-secrets-operator
- ../../../../bundles/kfp-tekton
- ../../../../bundles/opendatahub-operator-manual
- ../../../../bundles/openshift-pipelines
Expand All @@ -41,7 +42,8 @@ resources:
- operators.coreos.com/operatorgroups/nvidia-gpu-operator
- operators.coreos.com/subscriptions/nvidia-gpu-operator
- nvidia-gpu

- secretstores
- serviceaccounts
patchesStrategicMerge:
- oauths/cluster-patch.yaml
- configmaps/cluster-monitoring-config.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: openshift-monitoring
namespace: openshift-monitoring
spec:
provider:
vault:
auth:
kubernetes:
mountPath: osc-cl2-k8s
role: osc-ops
serviceAccountRef:
name: vault-secret-fetcher
path: k8s_secrets
server: 'https://vault-ui-vault.apps.smaug.na.operate-first.cloud'
version: v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-openshift-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault-secret-fetcher
namespace: openshift-monitoring
1 change: 1 addition & 0 deletions external-secrets/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- eso.yaml
- serviceaccount.yaml
4 changes: 4 additions & 0 deletions external-secrets/base/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: eso-vault-auth
5 changes: 5 additions & 0 deletions external-secrets/overlays/emea/balrog/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: external-secrets-operator
resources:
- ../../../base
5 changes: 5 additions & 0 deletions external-secrets/overlays/emea/morty/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: external-secrets-operator
resources:
- ../../../base
5 changes: 5 additions & 0 deletions external-secrets/overlays/emea/rick/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: external-secrets-operator
resources:
- ../../../base
Loading

0 comments on commit 197bfbd

Please sign in to comment.