# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Pod
metadata:
  labels:
    component: kube-controller-manager
    tier: control-plane
  name: kube-controller-manager
  namespace: kube-system
spec:
  containers:
  - command:
    - /bin/sh
    - -c
    - exec /usr/local/bin/kube-controller-manager --v=2
      --cloud-config=/etc/gce.conf
      --use-service-account-credentials
      --cloud-provider=gce
      --kubeconfig=/etc/srv/kubernetes/kube-controller-manager/kubeconfig
      --root-ca-file=/etc/srv/kubernetes/pki/ca-certificates.crt
      --service-account-private-key-file=/etc/srv/kubernetes/pki/serviceaccount.key
      --cluster-name=zork
      --cluster-cidr=10.48.0.0/14
      --service-cluster-ip-range=10.32.240.0/20
      --allocate-node-cidrs=true
      --terminated-pod-gc-threshold=1000
      1>>/var/log/kube-controller-manager.log 2>&1
    image: k8s.gcr.io/kube-controller-manager:v1.9.7
    livenessProbe:
      httpGet:
        host: 127.0.0.1
        path: /healthz
        port: 10252
      initialDelaySeconds: 15
      timeoutSeconds: 15
    name: kube-controller-manager
    resources:
      requests:
        cpu: 200m
    volumeMounts:
    - mountPath: /etc/gce.conf
      name: cloudconfigmount
      readOnly: true
    - mountPath: /home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml
      name: pv-recycler-mount
      readOnly: true
    - mountPath: /etc/srv/kubernetes
      name: srvkube
      readOnly: true
    - mountPath: /var/log/kube-controller-manager.log
      name: logfile
      readOnly: false
    - mountPath: /etc/ssl
      name: etcssl
      readOnly: true
    - mountPath: /usr/share/ca-certificates
      name: usrsharecacerts
      readOnly: true
    - mountPath: /var/ssl
      name: varssl
      readOnly: true
    - mountPath: /etc/openssl
      name: etcopenssl
      readOnly: true
    - mountPath: /etc/pki
      name: etcpki
      readOnly: true
  hostNetwork: true
  volumes:
  - hostPath:
      path: /etc/gce.conf
      type: FileOrCreate
    name: cloudconfigmount
  - hostPath:
      path: /home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml
      type: FileOrCreate
    name: pv-recycler-mount
  - hostPath:
      path: /etc/srv/kubernetes
    name: srvkube
  - hostPath:
      path: /var/log/kube-controller-manager.log
      type: FileOrCreate
    name: logfile
  - hostPath:
      path: /etc/ssl
    name: etcssl
  - hostPath:
      path: /usr/share/ca-certificates
    name: usrsharecacerts
  - hostPath:
      path: /var/ssl
    name: varssl
  - hostPath:
      path: /etc/openssl
    name: etcopenssl
  - hostPath:
      path: /etc/pki
    name: etcpki
