From faf0fbbead2639ea5501e9feadbc68ad0c55f34d Mon Sep 17 00:00:00 2001 From: Siddharth Barahalikar Date: Wed, 21 Sep 2022 01:39:22 +0530 Subject: [PATCH] vault --- sealed-secret/deployment.yaml | 16 ++++++++-------- vault-secrets/deployment.yaml | 31 +++++++++++++++++++++++++++++++ vault-secrets/secret.yaml | 2 +- vault-secrets/service.yaml | 15 +++++++++++++++ 4 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 vault-secrets/deployment.yaml create mode 100644 vault-secrets/service.yaml diff --git a/sealed-secret/deployment.yaml b/sealed-secret/deployment.yaml index 3709300..b13abb3 100644 --- a/sealed-secret/deployment.yaml +++ b/sealed-secret/deployment.yaml @@ -21,11 +21,11 @@ spec: - image: siddharth67/sealed-secrets:v1 name: secret-app # uncomment block to mount secret -# volumeMounts: -# - name: app-secret-vol -# mountPath: "/app/crds" -# readOnly: true -# volumes: -# - name: app-secret-vol -# secret: -# secretName: app-crds + volumeMounts: + - name: app-secret-vol + mountPath: "/app/crds" + readOnly: true + volumes: + - name: app-secret-vol + secret: + secretName: app-crds diff --git a/vault-secrets/deployment.yaml b/vault-secrets/deployment.yaml new file mode 100644 index 0000000..3709300 --- /dev/null +++ b/vault-secrets/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: secret-app + name: secret-app +spec: + replicas: 1 + selector: + matchLabels: + app: secret-app + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: secret-app + spec: + containers: + - image: siddharth67/sealed-secrets:v1 + name: secret-app + # uncomment block to mount secret +# volumeMounts: +# - name: app-secret-vol +# mountPath: "/app/crds" +# readOnly: true +# volumes: +# - name: app-secret-vol +# secret: +# secretName: app-crds diff --git a/vault-secrets/secret.yaml b/vault-secrets/secret.yaml index ee22d2e..8f7cf14 100644 --- a/vault-secrets/secret.yaml +++ b/vault-secrets/secret.yaml @@ -1,7 +1,7 @@ kind: Secret apiVersion: v1 metadata: - name: example-secret + name: app-crds annotations: avp.kubernetes.io/path: "app/data/crds" type: Opaque diff --git a/vault-secrets/service.yaml b/vault-secrets/service.yaml new file mode 100644 index 0000000..ffcb794 --- /dev/null +++ b/vault-secrets/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: secret-app + name: secret-app +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: secret-app + type: NodePort