# 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: apps/v1
kind: Deployment
metadata:
    name: managed-certificate-controller
spec:
    replicas: 1
    selector:
        matchLabels:
            app: managed-certificate-controller
    template:
        metadata:
            labels:
                app: managed-certificate-controller
        spec:
            serviceAccountName: test-account
            containers:
                - name: managed-certificate-controller
                  image: eu.gcr.io/managed-certs-gke/managed-certificate-controller:ci_latest
                  imagePullPolicy: Always
                  volumeMounts:
                      - name: ssl-certs
                        mountPath: "/etc/ssl/certs"
                        readOnly: true
                      - name: usrsharecacerts
                        mountPath: "/usr/share/ca-certificates"
                        readOnly: true
                      - name: logfile
                        mountPath: "/var/log/managed_certificate_controller.log"
                        readOnly: false
            volumes:
                - name: ssl-certs
                  hostPath:
                      path: "/etc/ssl/certs"
                - name: usrsharecacerts
                  hostPath:
                      path: "/usr/share/ca-certificates"
                - name: logfile
                  hostPath:
                      path: "/var/log/managed_certificate_controller.log"
                      type: FileOrCreate
