Skip to content

Instantly share code, notes, and snippets.

@mauilion
Created July 31, 2018 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauilion/4dd405b2ed615330583720130f1ced5e to your computer and use it in GitHub Desktop.
Save mauilion/4dd405b2ed615330583720130f1ced5e to your computer and use it in GitHub Desktop.
problem with packaging.
$ sonobuoy version
v0.11.5
$ strings sonobuoy | grep -A80 kind..DaemonSet
kind: DaemonSet
metadata:
annotations:
sonobuoy-driver: DaemonSet
sonobuoy-plugin: {{.PluginName}}
sonobuoy-result-type: {{.ResultType}}
labels:
component: sonobuoy
sonobuoy-run: '{{.SessionID}}'
tier: analysis
name: sonobuoy-{{.PluginName}}-daemon-set-{{.SessionID}}
namespace: '{{.Namespace}}'
spec:
selector:
matchLabels:
sonobuoy-run: '{{.SessionID}}'
template:
metadata:
labels:
component: sonobuoy
sonobuoy-run: '{{.SessionID}}'
tier: analysis
spec:
containers:
- {{.ProducerContainer | indent 8}}
- command: ["/run_single_node_worker.sh"]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: RESULTS_DIR
value: /tmp/results
- name: MASTER_URL
value: '{{.MasterAddress}}'
- name: RESULT_TYPE
value: {{.ResultType}}
- name: CA_CERT
value: |
{{.CACert | indent 12}}
- name: CLIENT_CERT
valueFrom:
secretKeyRef:
name: {{.SecretName}}
key: tls.crt
- name: CLIENT_KEY
valueFrom:
secretKeyRef:
name: {{.SecretName}}
key: tls.key
image: {{.SonobuoyImage}}
imagePullPolicy: {{.ImagePullPolicy}}
name: sonobuoy-worker
volumeMounts:
- mountPath: /tmp/results
name: results
readOnly: false
dnsPolicy: ClusterFirstWithHostNet
hostIPC: true
hostNetwork: true
hostPID: true
tolerations:
- operator: Exists
volumes:
- emptyDir: {}
name: results
- hostPath:
path: /
name: root
{{- range .ExtraVolumes }}
- {{ . | indent 8 }}
{{- end -}}
apiVersion: v1
kind: Namespace
metadata:
name: {{.Namespace}}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
component: sonobuoy
$ docker run -ti gcr.io/heptio-images/sonobuoy:v0.11.5 /bin/sh
/ # strings sonobuoy | grep -A80 kind..DaemonSet
kind: DaemonSet
metadata:
annotations:
sonobuoy-driver: DaemonSet
sonobuoy-plugin: {{.PluginName}}
sonobuoy-result-type: {{.ResultType}}
labels:
component: sonobuoy
sonobuoy-run: '{{.SessionID}}'
tier: analysis
name: sonobuoy-{{.PluginName}}-daemon-set-{{.SessionID}}
namespace: '{{.Namespace}}'
spec:
selector:
matchLabels:
sonobuoy-run: '{{.SessionID}}'
template:
metadata:
labels:
component: sonobuoy
sonobuoy-run: '{{.SessionID}}'
tier: analysis
spec:
containers:
- {{.ProducerContainer | indent 8}}
- command: ["/run_single_node_worker.sh"]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: RESULTS_DIR
value: /tmp/results
- name: MASTER_URL
value: '{{.MasterAddress}}'
- name: RESULT_TYPE
value: {{.ResultType}}
- name: CA_CERT
value: |
{{.CACert | indent 12}}
- name: CLIENT_CERT
valueFrom:
secretKeyRef:
name: {{.SecretName}}
key: tls.crt
- name: CLIENT_KEY
valueFrom:
secretKeyRef:
name: {{.SecretName}}
key: tls.key
image: {{.SonobuoyImage}}
imagePullPolicy: {{.ImagePullPolicy}}
name: sonobuoy-worker
volumeMounts:
- mountPath: /tmp/results
name: results
readOnly: false
dnsPolicy: ClusterFirstWithHostNet
hostIPC: true
hostNetwork: true
hostPID: true
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
volumes:
- emptyDir: {}
name: results
- hostPath:
path: /
name: root
{{- range .ExtraVolumes }}
- {{ . | indent 8 }}
{{- end -}}
apiVersion: v1
kind: Namespace
metadata:
name: {{.Namespace}}
apiVersion: v1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment