# Copyright 2022 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 # # http://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: ServiceAccount metadata: name: webhook-manager --- apiVersion: apps/v1 kind: Deployment metadata: name: webhook-manager labels: cnrm.cloud.google.com/component: cnrm-webhook-manager spec: revisionHistoryLimit: 1 selector: matchLabels: cnrm.cloud.google.com/component: cnrm-webhook-manager template: metadata: labels: cnrm.cloud.google.com/component: cnrm-webhook-manager spec: serviceAccountName: webhook-manager containers: - command: - /configconnector/webhook image: webhook:latest imagePullPolicy: Always env: - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace name: webhook ports: # Port used for readiness probe - containerPort: 23232 resources: requests: # This value was tuned to run on a GKE cluster with # default node settings. Increasing this value may # result in a backwards-incompatible change that breaks # add-on updates by not allowing new versions to schedule themselves. cpu: 250m memory: 128Mi limits: memory: 128Mi securityContext: privileged: false runAsUser: 1000 runAsNonRoot: true allowPrivilegeEscalation: false readinessProbe: httpGet: path: /ready port: 23232 initialDelaySeconds: 7 periodSeconds: 3 enableServiceLinks: false terminationGracePeriodSeconds: 10