<commit_before>{{/* vim: set filetype=gotexttmpl: */ -}}
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: "apps/v1"
{{- else }}
apiVersion: "extensions/v1beta1"
{{- end }}
kind: Deployment
metadata:
  name: {{ include "master.fullname" . }}-cmanager
  labels:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    release: {{ .Release.Name }}
spec:
  revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
  replicas: {{ .Values.api.replicaCount }}
  strategy:
    rollingUpdate:
      maxUnavailable: {{ if eq (toString .Values.api.replicaCount) "1" }}0{{else}}1{{end}}
      maxSurge: 1
  selector:
    matchLabels:
      app: controller-manager
      kluster: {{ .Values.name }}
      account: {{ .Values.account }}
  template:
    metadata:
      labels:
        component: controller-manager
        app: controller-manager
        kluster: {{ .Values.name }}
        account: {{ .Values.account }}
        release: {{ .Release.Name }}
      annotations:
        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
    spec:
      volumes:
        - name: certs
          secret:
            secretName: {{ .Values.secretName }}
            items:
              - key: tls-ca.pem
                path: tls-ca.pem
              - key: apiserver-clients-system-kube-controller-manager.pem
                path: kube-client.pem
              - key: apiserver-clients-system-kube-controller-manager-key.pem
                path: kube-client.key
              - key: apiserver-nodes-ca.pem
                path: apiserver-nodes-ca.pem
              - key: apiserver-nodes-ca-key.pem
                path: apiserver-nodes-ca-key.pem
              - key: apiserver-clients-ca.pem
                path: apiserver-clients-ca.pem
              - key: apiserver-clients-ca-key.pem
                path: apiserver-clients-ca-key.pem
        - name: config
          configMap:
            name: {{ include "master.fullname" . }}
        {{- if .Values.openstack }}
        - name: cloudprovider
          secret:
            secretName: {{ include "master.fullname" . }}-generated
            items:
              - key: openstack.config
                path: openstack.config
        - name: openstack-hacks
          configMap:
            name: {{ include "master.fullname" . }}-os-hacks
        {{- end }}
      initContainers:
        - name: apiserver-wait
{{- if (semverCompare ">= 1.19" .Values.version.kubernetes) }}
          image: {{ include "kubelet.image" . | quote }}
{{- else }}
          image: {{ include "hyperkube.image" . }}
{{- end }}
          command:
            - sh
            - -c
          args:
            - until kubectl cluster-info --kubeconfig /etc/kubernetes/config/kubeconfig --request-timeout=4s; do sleep 5; done;
          volumeMounts:
            - mountPath: /etc/kubernetes/certs/
              name: certs
              readOnly: true<commit_msg>Check for correct apiserver version on cmanager startup<commit_after>{{/* vim: set filetype=gotexttmpl: */ -}}
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: "apps/v1"
{{- else }}
apiVersion: "extensions/v1beta1"
{{- end }}
kind: Deployment
metadata:
  name: {{ include "master.fullname" . }}-cmanager
  labels:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    release: {{ .Release.Name }}
spec:
  revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
  replicas: {{ .Values.api.replicaCount }}
  strategy:
    rollingUpdate:
      maxUnavailable: {{ if eq (toString .Values.api.replicaCount) "1" }}0{{else}}1{{end}}
      maxSurge: 1
  selector:
    matchLabels:
      app: controller-manager
      kluster: {{ .Values.name }}
      account: {{ .Values.account }}
  template:
    metadata:
      labels:
        component: controller-manager
        app: controller-manager
        kluster: {{ .Values.name }}
        account: {{ .Values.account }}
        release: {{ .Release.Name }}
      annotations:
        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
    spec:
      volumes:
        - name: certs
          secret:
            secretName: {{ .Values.secretName }}
            items:
              - key: tls-ca.pem
                path: tls-ca.pem
              - key: apiserver-clients-system-kube-controller-manager.pem
                path: kube-client.pem
              - key: apiserver-clients-system-kube-controller-manager-key.pem
                path: kube-client.key
              - key: apiserver-nodes-ca.pem
                path: apiserver-nodes-ca.pem
              - key: apiserver-nodes-ca-key.pem
                path: apiserver-nodes-ca-key.pem
              - key: apiserver-clients-ca.pem
                path: apiserver-clients-ca.pem
              - key: apiserver-clients-ca-key.pem
                path: apiserver-clients-ca-key.pem
        - name: config
          configMap:
            name: {{ include "master.fullname" . }}
        {{- if .Values.openstack }}
        - name: cloudprovider
          secret:
            secretName: {{ include "master.fullname" . }}-generated
            items:
              - key: openstack.config
                path: openstack.config
        - name: openstack-hacks
          configMap:
            name: {{ include "master.fullname" . }}-os-hacks
        {{- end }}
      initContainers:
        - name: apiserver-wait
{{- if (semverCompare ">= 1.19" .Values.version.kubernetes) }}
          image: {{ include "kubelet.image" . | quote }}
{{- else }}
          image: {{ include "hyperkube.image" . }}
{{- end }}
          command:
            - sh
            - -c
          args:
            - until kubectl version --short --kubeconfig /etc/kubernetes/config/kubeconfig --request-timeout=4s | grep "Server Version. v{{ .Values.version.kubernetes }}"; do sleep 5; done;
          volumeMounts:
            - mountPath: /etc/kubernetes/certs/
              name: certs
              readOnly: true
{'fraction_non_alphanumeric': 0.13715792944279592, 'fraction_numerical': 0.006264424662050775, 'mean_word_length': 1.7614929449248975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5895395', 'n_tokens_mistral': 1874, 'n_tokens_neox': 1841, 'n_words': 358}