Created
June 8, 2020 13:56
-
-
Save coulof/d4260e4e17910bbdefbbecce4286074f to your computer and use it in GitHub Desktop.
csi-isilon custom X_NODE_IP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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