Skip to content

Instantly share code, notes, and snippets.

@joelrebel
Created August 27, 2024 16:06
Show Gist options
  • Save joelrebel/cb0c55408fda773b039aa22190638ecb to your computer and use it in GitHub Desktop.
Save joelrebel/cb0c55408fda773b039aa22190638ecb to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
labels:
k8s-app: nats-box
name: nats-box
spec:
containers:
- image: "natsio/nats-box"
name: nats-box
command: ["sleep", "10000"]
volumeMounts:
- name: nats-creds-volume
mountPath: /etc/nats
readOnly: true
env:
- name: PODNAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: CONDITIONORC_NATS_URL
value: "{{ .Values.envVar.NATS_URL }}"
- name: CONDITIONORC_NATS_CREDS_FILE
value: /etc/nats/nats.creds
securityContext:
capabilities:
drop:
- NET_RAW
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 200m
memory: 256Mi
volumes:
- name: nats-creds-volume
secret:
secretName: conditionorc-secrets
items:
- key: conditionorc-nats-creds
path: nats.creds
restartPolicy: Never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment