diff --git a/hack/manifests/busybox-ds.yaml b/hack/manifests/busybox-ds.yaml new file mode 100644 index 0000000000..b57094dd6c --- /dev/null +++ b/hack/manifests/busybox-ds.yaml @@ -0,0 +1,79 @@ +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: busybox + labels: + app: busybox +spec: + selector: + matchLabels: + k8s-app: busybox + template: + metadata: + labels: + k8s-app: busybox + annotations: + cluster-autoscaler.kubernetes.io/daemonset-pod: "true" + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.azure.com/cluster + operator: Exists + - key: type + operator: NotIn + values: + - virtual-kubelet + - key: kubernetes.io/os + operator: In + values: + - linux + priorityClassName: system-node-critical + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - operator: "Exists" + effect: NoExecute + - operator: "Exists" + effect: NoSchedule + containers: + - name: busybox + image: docker.io/busybox:latest + command: ["sleep","3600"] + imagePullPolicy: Always + volumeMounts: + - name: log + mountPath: /var/log + - name: cns-state + mountPath: /var/lib/azure-network + - name: cni-bin + mountPath: /opt/cni/bin + - name: azure-vnet + mountPath: /var/run/azure-vnet + - name: legacy-cni-state + mountPath: /var/run/azure-vnet.json + hostNetwork: false + volumes: + - name: log + hostPath: + path: /var/log + type: Directory + - name: cns-state + hostPath: + path: /var/lib/azure-network + type: DirectoryOrCreate + - name: cni-bin + hostPath: + path: /opt/cni/bin + type: Directory + - name: azure-vnet + hostPath: + path: /var/run/azure-vnet + type: DirectoryOrCreate + - name: legacy-cni-state + hostPath: + path: /var/run/azure-vnet.json + type: FileOrCreate diff --git a/hack/manifests/busybox.yaml b/hack/manifests/busybox.yaml new file mode 100644 index 0000000000..5df9093b63 --- /dev/null +++ b/hack/manifests/busybox.yaml @@ -0,0 +1,79 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: busybox + labels: + app: busybox +spec: + selector: + matchLabels: + k8s-app: busybox + template: + metadata: + labels: + k8s-app: busybox + annotations: + cluster-autoscaler.kubernetes.io/daemonset-pod: "true" + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.azure.com/cluster + operator: Exists + - key: type + operator: NotIn + values: + - virtual-kubelet + - key: kubernetes.io/os + operator: In + values: + - linux + priorityClassName: system-node-critical + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - operator: "Exists" + effect: NoExecute + - operator: "Exists" + effect: NoSchedule + containers: + - name: busybox + image: docker.io/busybox:latest + command: ["sleep","3600"] + imagePullPolicy: Always + volumeMounts: + - name: log + mountPath: /var/log + - name: cns-state + mountPath: /var/lib/azure-network + - name: cni-bin + mountPath: /opt/cni/bin + - name: azure-vnet + mountPath: /var/run/azure-vnet + - name: legacy-cni-state + mountPath: /var/run/azure-vnet.json + hostNetwork: false + volumes: + - name: log + hostPath: + path: /var/log + type: Directory + - name: cns-state + hostPath: + path: /var/lib/azure-network + type: DirectoryOrCreate + - name: cni-bin + hostPath: + path: /opt/cni/bin + type: Directory + - name: azure-vnet + hostPath: + path: /var/run/azure-vnet + type: DirectoryOrCreate + - name: legacy-cni-state + hostPath: + path: /var/run/azure-vnet.json + type: FileOrCreate diff --git a/hack/manifests/kubectl.yaml b/hack/manifests/kubectl.yaml new file mode 100644 index 0000000000..0b241ca168 --- /dev/null +++ b/hack/manifests/kubectl.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: kubectl +spec: + containers: + - name: kubectl + image: docker.io/bitnami/kubectl:latest + command: ["/bin/bash", "-c", "--"] + args: ["sleep 3600"] + env: + - name: KUBECONFIG + value: "/etc/kubeconf/kubeconfig.yaml" + volumeMounts: + - name: kubeconf + mountPath: "/etc/kubeconf" + readOnly: true + volumes: + - name: kubeconf + secret: + secretName: kubeconfig-file diff --git a/hack/manifests/scaler.yaml b/hack/manifests/scaler.yaml new file mode 100644 index 0000000000..fa857797f6 --- /dev/null +++ b/hack/manifests/scaler.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node-scaler +spec: + selector: + matchLabels: + app: node-scaler + replicas: 3 + template: + metadata: + labels: + app: node-scaler + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - node-scaler + topologyKey: "kubernetes.io/hostname" + containers: + - name: anti-affinity + image: k8s.gcr.io/pause:2.0 + hostNetwork: true diff --git a/hack/manifests/sshd.yaml b/hack/manifests/sshd.yaml new file mode 100644 index 0000000000..a66d465231 --- /dev/null +++ b/hack/manifests/sshd.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sshd + labels: + app: sshd +spec: + replicas: 1 + selector: + matchLabels: + app: sshd + template: + metadata: + labels: + app: sshd + spec: + hostNetwork: true + containers: + - name: sshd + image: docker.io/linuxserver/openssh-server:latest + env: + - name: USER_PASSWORD + value: aoeuaoeu + volumeMounts: + - name: cni-bin + mountPath: /opt/cni/bin + - name: cni-state + mountPath: /var/run/azure-vnet.json + volumes: + - name: cni-bin + hostPath: + path: /opt/cni/bin + type: Directory + - name: cni-state + hostPath: + path: /var/run/azure-vnet.json + type: File