Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
Last active May 19, 2021 02:39
Show Gist options
  • Save sandipchitale/228b368ba0646aa09c658f6ad2192951 to your computer and use it in GitHub Desktop.
Save sandipchitale/228b368ba0646aa09c658f6ad2192951 to your computer and use it in GitHub Desktop.
Echo number of args and args #kubernetes #pod #bash
apiVersion: v1
kind: Pod
metadata:
name: bash
labels:
app: bash
spec:
containers:
- image: bash
env:
- name: JAVA_OPTS
value: >-
-DKAKA=KAKU
-DMAMA=MAMI
-DVVVV=!&#(
command: ["/bin/sh"]
args:
- -c
- >-
function args() { echo $#; echo $@; } &&
args $JAVA_OPTS &&
tail -f /dev/null
imagePullPolicy: IfNotPresent
name: bash
resources:
requests:
memory: "10Mi"
cpu: ".5m"
limits:
memory: "10Mi"
cpu: ".5m"
restartPolicy: Always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment