Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
godaddy external-secrets test
---
apiVersion: 'kubernetes-client.io/v1'
kind: ExternalSecret
metadata:
name: test-external-secrets
namespace: default
secretDescriptor:
backendType: secretsManager
data:
- key: /splunk/license
name: splunk_license
---
# This is optional as ExternalSecret will create it if it doesn't exist,
# however, it will ensure that the 'secret' entry is removed if delete is run on
# this file.
apiVersion: v1
kind: Secret
metadata:
name: test-external-secrets
namespace: default
type: Opaque
---
apiVersion: v1
kind: Pod
metadata:
name: test-external-secrets
namespace: default
spec:
containers:
- name: test-external-secrets
image: "ruby:latest"
command:
- "ruby"
- "-rbase64"
- "-e"
- "puts Base64.decode64(ENV.fetch('SPLUNK_LICENSE'))"
# Using 'ENV.fetch' above ensure that this container will go in to a
# failure loop until the secret is set and exists.
env:
- name: SPLUNK_LICENSE
valueFrom:
secretKeyRef:
name: test-external-secrets
key: splunk_license
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.