Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
csi-isilon custom X_NODE_IP
spec:
template:
spec:
initContainers:
- name: config
image: "ruby:2.7"
command: ['sh', '-c', 'erb /tmpl/entrypoint.sh.erb > /custom/entrypoint.sh && chmod +x /custom/entrypoint.sh']
volumeMounts:
- name: cfgtmpl
mountPath: /tmpl
- name: configdir
mountPath: /custom
containers:
- name: driver
command: ["/custom/entrypoint.sh"]
volumeMounts:
- mountPath: /custom
name: configdir
volumes:
- name: cfgtmpl
configMap:
name: nodeip-cfg
- name: configdir
emptyDir: {}
apiVersion: v1
kind: ConfigMap
metadata:
name: nodeip-cfg
namespace: isilon
data:
entrypoint.sh.erb: |
#!/bin/sh
export X_NODE_IP=<%= %x@ip -4 addr show dev ens33 | grep inet@[/inet\s+(\d+(\.\d+){3})/,1] %>
exec "/csi-isilon"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment