Created
January 22, 2021 16:55
-
-
Save minherz/2c4352f3456b6706358bc6b6a50ad5c0 to your computer and use it in GitHub Desktop.
Deploy solution as a daemonset
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: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: node-labeling | |
labels: | |
app: node-labeling | |
spec: | |
selector: | |
matchLabels: | |
app: node-labeling | |
updateStrategy: | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
name: node-labeling | |
app: node-labeling | |
spec: | |
serviceAccountName: node-labeling-robot | |
volumes: | |
- name: files | |
configMap: | |
name: node-labeling-files | |
initContainers: | |
- image: python:3.8 | |
name: node-labeling | |
command: ["/bin/bash"] | |
args: ["-c", "pip3 install -r /etc/node-labeling-app/requirements.txt; python3 /etc/node-labeling-app/main.py --name workload"] | |
env: | |
- name: NODE_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: spec.nodeName | |
volumeMounts: | |
- name: files | |
mountPath: /etc/node-labeling-app | |
containers: | |
- image: "gcr.io/google-containers/pause:2.0" | |
name: pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment