<commit_before>{{- define "ironic_conductor_deployment" }}
    {{- $conductor := index . 1 }}
    {{- with index . 0 }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ironic-conductor-{{$conductor.name}}
  labels:
    system: openstack
    type: conductor
    component: ironic
spec:
  replicas: 1
  revisionHistoryLimit: {{ .Values.pod.lifecycle.upgrades.deployments.revisionHistory }}
  strategy:
    type: {{ .Values.pod.lifecycle.upgrades.deployments.podReplacementStrategy }}
    {{ if eq .Values.pod.lifecycle.upgrades.deployments.podReplacementStrategy "RollingUpdate" }}
    rollingUpdate:
      maxUnavailable: {{ .Values.pod.lifecycle.upgrades.deployments.rollingupdate.maxUnavailable }}
      maxSurge: {{ .Values.pod.lifecycle.upgrades.deployments.rollingupdate.maxSurge }}
    {{ end }}
  selector:
    matchLabels:
      name: ironic-conductor-{{$conductor.name}}
  template:
    metadata:
      labels:
        name: ironic-conductor-{{$conductor.name}}
{{ tuple . "ironic" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
      annotations:
        configmap-etc-hash: {{ include (print .Template.BasePath "/etc-configmap.yaml") . | sha256sum }}
        configmap-etc-conductor-hash: {{ tuple . $conductor | include "ironic_conductor_configmap" | sha256sum }}{{- if $conductor.jinja2 }}{{`
        configmap-etc-jinja2-hash: {{ block | safe | sha256sum }}
`}}{{- end }}
    spec:
      containers:
      - name: ironic-conductor
        image: {{.Values.global.imageRegistry}}/{{.Values.global.image_namespace}}/ubuntu-source-ironic-conductor:{{.Values.imageVersionIronicConductor | default .Values.imageVersion | required "Please set ironic.imageVersion or similar"}}
        imagePullPolicy: IfNotPresent
        {{- if $conductor.debug }}
        securityContext:
          runAsUser: 0
        {{- end }}
        command:
        - dumb-init
        - kubernetes-entrypoint
        env:
        - name: COMMAND
          {{- if not $conductor.debug }}
          value: "ironic-conductor --config-file /etc/ironic/ironic.conf --config-file /etc/ironic/ironic-conductor.conf"
          {{- else }}
          value: "sleep inf"
          {{- end }}
        - name: NAMESPACE
          value: {{ .Release.Namespace }}
        - name: DEPENDENCY_SERVICE
          value: "ironic-api,rabbitmq"
        {{- if .Values.logging.handlers.sentry }}
        - name: SENTRY_DSN
          valueFrom:
            secretKeyRef:
              name: sentry
              key: {{ .Chart.Name }}.DSN.python
        {{- end }}
        - name: PGAPPNAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        {{- if not $conductor.debug }}
        resources:
{{ toYaml .Values.pod.conductor.resources | indent 10 }}
        livenessProbe:
          exec:
            command:
            - bash
            - -c
            - eval $(cat /etc/ironic/ironic.conf | grep -Pzo '\[service_catalog\][^[]*' | tr -d '\000' | grep '='  | while read LINE; do var="${LINE% =*}" ; val="${LINE#*= }" ; echo export OS_${var^^}=${val} ; done); OS_IDENTITY_API_VERSION=3 openstack baremetal driver list -f csv | grep 'ironic-conductor-{{$conductor.name}}[,"]' >/dev/null
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 3
        {{- end }}
        volumeMounts:
        - mountPath: /etc/ironic
          name: etcironic<commit_msg>[ironic] fixes minor helm typo<commit_after>{{- define "ironic_conductor_deployment" }}
    {{- $conductor := index . 1 }}
    {{- with index . 0 }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ironic-conductor-{{$conductor.name}}
  labels:
    system: openstack
    type: conductor
    component: ironic
spec:
  replicas: 1
  revisionHistoryLimit: {{ .Values.pod.lifecycle.upgrades.deployments.revisionHistory }}
  strategy:
    type: {{ .Values.pod.lifecycle.upgrades.deployments.podReplacementStrategy }}
    {{ if eq .Values.pod.lifecycle.upgrades.deployments.podReplacementStrategy "RollingUpdate" }}
    rollingUpdate:
      maxUnavailable: {{ .Values.pod.lifecycle.upgrades.deployments.rollingupdate.maxUnavailable }}
      maxSurge: {{ .Values.pod.lifecycle.upgrades.deployments.rollingupdate.maxSurge }}
    {{ end }}
  selector:
    matchLabels:
      name: ironic-conductor-{{$conductor.name}}
  template:
    metadata:
      labels:
        name: ironic-conductor-{{$conductor.name}}
{{ tuple . "ironic" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
      annotations:
        configmap-etc-hash: {{ include (print .Template.BasePath "/etc-configmap.yaml") . | sha256sum }}
        configmap-etc-conductor-hash: {{ tuple . $conductor | include "ironic_conductor_configmap" | sha256sum }}{{- if $conductor.jinja2 }}{{`
        configmap-etc-jinja2-hash: {{ block | safe | sha256sum }}
`}}{{- end }}
    spec:
      containers:
      - name: ironic-conductor
        image: {{.Values.global.imageRegistry}}/{{.Values.global.image_namespace}}/ubuntu-source-ironic-conductor:{{.Values.imageVersionIronicConductor | default .Values.imageVersion | required "Please set ironic.imageVersion or similar"}}
        imagePullPolicy: IfNotPresent
        {{- if $conductor.debug }}
        securityContext:
          runAsUser: 0
        {{- end }}
        command:
        - dumb-init
        - kubernetes-entrypoint
        env:
        - name: COMMAND
          {{- if not $conductor.debug }}
          value: "ironic-conductor --config-file /etc/ironic/ironic.conf --config-file /etc/ironic/ironic-conductor.conf"
          {{- else }}
          value: "sleep inf"
          {{- end }}
        - name: NAMESPACE
          value: {{ .Release.Namespace }}
        - name: DEPENDENCY_SERVICE
          value: "ironic-api,rabbitmq"
        {{- if .Values.logging.handlers.sentry }}
        - name: SENTRY_DSN
          valueFrom:
            secretKeyRef:
              name: sentry
              key: {{ .Chart.Name }}.DSN.python
        {{- end }}
        - name: PGAPPNAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        {{- if not $conductor.debug }}
        resources:
{{ toYaml .Values.pod.resources.conductor | indent 10 }}
        livenessProbe:
          exec:
            command:
            - bash
            - -c
            - eval $(cat /etc/ironic/ironic.conf | grep -Pzo '\[service_catalog\][^[]*' | tr -d '\000' | grep '='  | while read LINE; do var="${LINE% =*}" ; val="${LINE#*= }" ; echo export OS_${var^^}=${val} ; done); OS_IDENTITY_API_VERSION=3 openstack baremetal driver list -f csv | grep 'ironic-conductor-{{$conductor.name}}[,"]' >/dev/null
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 3
        {{- end }}
        volumeMounts:
        - mountPath: /etc/ironic
          name: etcironic
{'fraction_non_alphanumeric': 0.13886879791696802, 'fraction_numerical': 0.008389989874150152, 'mean_word_length': 2.3546821931101407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '933850', 'n_tokens_mistral': 2241, 'n_tokens_neox': 2039, 'n_words': 403}