sigs.k8s.io/cluster-api-provider-azure@v1.14.3/hack/observability/opentelemetry/chart/templates/_pod.tpl (about)

     1  {{- define "opentelemetry-collector.pod" -}}
     2  {{- with .Values.imagePullSecrets }}
     3  imagePullSecrets:
     4    {{- toYaml . | nindent 2 }}
     5  {{- end }}
     6  serviceAccountName: {{ include "opentelemetry-collector.serviceAccountName" . }}
     7  securityContext:
     8    {{- toYaml .Values.podSecurityContext | nindent 2 }}
     9  containers:
    10    - name: {{ .Chart.Name }}
    11      command:
    12        - /{{ .Values.command.name }}
    13        - --config=/conf/relay.yaml
    14        {{- range .Values.command.extraArgs }}
    15        - {{ . }}
    16        {{- end }}
    17      securityContext:
    18        {{- toYaml .Values.securityContext | nindent 6 }}
    19      image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
    20      imagePullPolicy: {{ .Values.image.pullPolicy }}
    21      ports:
    22        {{- range $key, $port := .Values.ports }}
    23        {{- if $port.enabled }}
    24        - name: {{ $key }}
    25          containerPort: {{ $port.containerPort }}
    26          protocol: {{ $port.protocol }}
    27          {{- if and $.isAgent $port.hostPort }}
    28          hostPort: {{ $port.hostPort }}
    29          {{- end }}
    30        {{- end }}
    31        {{- end }}
    32      env:
    33        - name: MY_POD_IP
    34          valueFrom:
    35            fieldRef:
    36              apiVersion: v1
    37              fieldPath: status.podIP
    38        {{- with .Values.extraEnvs }}
    39        {{- . | toYaml | nindent 6 }}
    40        {{- end }}
    41      livenessProbe:
    42        httpGet:
    43          path: /
    44          port: 13133
    45      readinessProbe:
    46        httpGet:
    47          path: /
    48          port: 13133
    49      resources:
    50        {{- toYaml .Values.resources | nindent 6 }}
    51      volumeMounts:
    52        - mountPath: /conf
    53          name: {{ .Chart.Name }}-configmap
    54        {{- range .Values.extraConfigMapMounts }}
    55        - name: {{ .name }}
    56          mountPath: {{ .mountPath }}
    57          readOnly: {{ .readOnly }}
    58          {{- if .subPath }}
    59          subPath: {{ .subPath }}
    60          {{- end }}
    61        {{- end }}
    62        {{- range .Values.extraHostPathMounts }}
    63        - name: {{ .name }}
    64          mountPath: {{ .mountPath }}
    65          readOnly: {{ .readOnly }}
    66          {{- if .mountPropagation }}
    67          mountPropagation: {{ .mountPropagation }}
    68          {{- end }}
    69        {{- end }}
    70        {{- range .Values.secretMounts }}
    71        - name: {{ .name }}
    72          mountPath: {{ .mountPath }}
    73          readOnly: {{ .readOnly }}
    74          {{- if .subPath }}
    75          subPath: {{ .subPath }}
    76          {{- end }}
    77        {{- end }}
    78        {{- if and $.isAgent .Values.agentCollector.containerLogs.enabled }}
    79        - name: varlogpods
    80          mountPath: /var/log/pods
    81          readOnly: true
    82        - name: varlibdockercontainers
    83          mountPath: /var/lib/docker/containers
    84          readOnly: true
    85        {{- end }}
    86        {{- if .Values.extraVolumeMounts }}
    87        {{- toYaml .Values.extraVolumeMounts | nindent 6 }}
    88        {{- end }}
    89  {{- if .Values.priorityClassName }}
    90  priorityClassName: {{ .Values.priorityClassName | quote }}
    91  {{- end }}
    92  volumes:
    93    - name: {{ .Chart.Name }}-configmap
    94      configMap:
    95        name: {{ include "opentelemetry-collector.fullname" . }}{{ .configmapSuffix }}
    96        items:
    97          - key: relay
    98            path: relay.yaml
    99    {{- range .Values.extraConfigMapMounts }}
   100    - name: {{ .name }}
   101      configMap:
   102        name: {{ .configMap }}
   103    {{- end }}
   104    {{- range .Values.extraHostPathMounts }}
   105    - name: {{ .name }}
   106      hostPath:
   107        path: {{ .hostPath }}
   108    {{- end }}
   109    {{- range .Values.secretMounts }}
   110    - name: {{ .name }}
   111      secret:
   112        secretName: {{ .secretName }}
   113    {{- end }}
   114    {{- if and $.isAgent .Values.agentCollector.containerLogs.enabled }}
   115    - name: varlogpods
   116      hostPath:
   117        path: /var/log/pods
   118    - name: varlibdockercontainers
   119      hostPath:
   120        path: /var/lib/docker/containers
   121    {{- end }}
   122    {{- if .Values.extraVolumes }}
   123    {{- toYaml .Values.extraVolumes | nindent 2 }}
   124    {{- end }}
   125  {{- with .Values.nodeSelector }}
   126  nodeSelector:
   127    {{- toYaml . | nindent 2 }}
   128  {{- end }}
   129  {{- with .Values.affinity }}
   130  affinity:
   131    {{- toYaml . | nindent 2 }}
   132  {{- end }}
   133  {{- with .Values.tolerations }}
   134  tolerations:
   135    {{- toYaml . | nindent 2 }}
   136  {{- end }}
   137  {{- end }}