Add more fields to daemonjob crd spec.
Change-Id: I1690035c7e35887245bbdcfdc97b19409fd6ab8a
This commit is contained in:
parent
d0f808a64e
commit
55beab680f
@ -70,6 +70,10 @@ spec:
|
|||||||
type: string
|
type: string
|
||||||
imagePullPolicy:
|
imagePullPolicy:
|
||||||
type: string
|
type: string
|
||||||
|
args:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
command:
|
command:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -353,6 +357,8 @@ spec:
|
|||||||
type: boolean
|
type: boolean
|
||||||
stdin:
|
stdin:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
hostNetwork:
|
||||||
|
type: boolean
|
||||||
terminationGracePeriodSeconds:
|
terminationGracePeriodSeconds:
|
||||||
type: integer
|
type: integer
|
||||||
status:
|
status:
|
||||||
|
@ -24,7 +24,6 @@ metadata:
|
|||||||
name: daemonjob-controller
|
name: daemonjob-controller
|
||||||
annotations:
|
annotations:
|
||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 4 }}
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 4 }}
|
||||||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
{{ tuple $envAll "daemonjob-controller" "controller" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
{{ tuple $envAll "daemonjob-controller" "controller" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
@ -37,10 +36,13 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
{{ dict "envAll" $envAll "podName" "daemonjob-controller" "containerNames" (list "controller") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
{{ dict "envAll" $envAll "podName" "daemonjob-controller" "containerNames" (list "controller") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
labels:
|
labels:
|
||||||
{{ tuple $envAll "daemonjob-controller" "controller" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll "daemonjob-controller" "controller" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.daemonjob_controller.node_selector_key }}: {{ .Values.labels.daemonjob_controller.node_selector_value | quote }}
|
||||||
containers:
|
containers:
|
||||||
- name: controller
|
- name: controller
|
||||||
{{ tuple $envAll "python" | include "helm-toolkit.snippets.image" | indent 8 }}
|
{{ tuple $envAll "python" | include "helm-toolkit.snippets.image" | indent 8 }}
|
||||||
|
@ -27,6 +27,11 @@ images:
|
|||||||
- dep_check
|
- dep_check
|
||||||
- image_repo_sync
|
- image_repo_sync
|
||||||
|
|
||||||
|
labels:
|
||||||
|
daemonjob_controller:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
|
||||||
crds:
|
crds:
|
||||||
group_name: ctl.example.com
|
group_name: ctl.example.com
|
||||||
group_version: v1
|
group_version: v1
|
||||||
|
@ -64,12 +64,8 @@ spec:
|
|||||||
{{ tuple $envAll "metacontroller" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
{{ tuple $envAll "metacontroller" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
||||||
serviceName: {{ tuple "metacontroller" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
serviceName: {{ tuple "metacontroller" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
podManagementPolicy: "Parallel"
|
podManagementPolicy: "Parallel"
|
||||||
affinity:
|
|
||||||
{{ tuple $envAll "metacontroller" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 4 }}
|
|
||||||
replicas: {{ .Values.pod.replicas.metacontroller }}
|
replicas: {{ .Values.pod.replicas.metacontroller }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.server.timeout | default "30" }}
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.server.timeout | default "30" }}
|
||||||
nodeSelector:
|
|
||||||
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value | quote }}
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -79,6 +75,8 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
{{ dict "envAll" . "application" "metacontroller" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
{{ dict "envAll" . "application" "metacontroller" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value | quote }}
|
||||||
containers:
|
containers:
|
||||||
- name: metacontroller
|
- name: metacontroller
|
||||||
{{ tuple $envAll "metacontroller" | include "helm-toolkit.snippets.image" | indent 8 }}
|
{{ tuple $envAll "metacontroller" | include "helm-toolkit.snippets.image" | indent 8 }}
|
||||||
|
@ -56,7 +56,14 @@ apiVersion: ctl.example.com/v1
|
|||||||
kind: DaemonJob
|
kind: DaemonJob
|
||||||
metadata:
|
metadata:
|
||||||
name: hello-world
|
name: hello-world
|
||||||
|
annotations:
|
||||||
|
imageregistry: "https://hub.docker.com/"
|
||||||
|
labels:
|
||||||
|
app: hello-world
|
||||||
spec:
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: hello-world
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -90,6 +97,7 @@ until [[ "$(kubectl get $dj hello-world -o 'jsonpath={.status.conditions[0].stat
|
|||||||
else
|
else
|
||||||
daemonset_pod_status=$(kubectl get pods | awk '/hello-world-dj/{print $3}')
|
daemonset_pod_status=$(kubectl get pods | awk '/hello-world-dj/{print $3}')
|
||||||
if [ $daemonset_pod_status == 'Init:0/1' ]; then
|
if [ $daemonset_pod_status == 'Init:0/1' ]; then
|
||||||
|
kubectl describe dj hello-world
|
||||||
init_container_status=$(kubectl get pod $daemonset_pod -o 'jsonpath={.status.initContainerStatuses[0].state.running}')
|
init_container_status=$(kubectl get pod $daemonset_pod -o 'jsonpath={.status.initContainerStatuses[0].state.running}')
|
||||||
if [ ! -z "$init_container_status" ]; then
|
if [ ! -z "$init_container_status" ]; then
|
||||||
expected_log=$(kubectl logs $daemonset_pod -c hello-world)
|
expected_log=$(kubectl logs $daemonset_pod -c hello-world)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user