# 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: Namespace metadata: name: configconnector-operator-system --- apiVersion: v1 kind: ServiceAccount metadata: name: configconnector-operator --- apiVersion: v1 kind: Service metadata: name: configconnector-operator-service spec: ports: - name: controller-manager port: 443 selector: cnrm.cloud.google.com/component: configconnector-operator --- apiVersion: apps/v1 kind: StatefulSet metadata: labels: cnrm.cloud.google.com/component: configconnector-operator name: configconnector-operator spec: # specifying replicas explicitly would help to enforce the intended # value when the file is applied. replicas: 1 selector: matchLabels: cnrm.cloud.google.com/component: configconnector-operator serviceName: configconnector-operator-service template: metadata: labels: cnrm.cloud.google.com/component: configconnector-operator spec: securityContext: seccompProfile: type: RuntimeDefault containers: - args: - --local-repo=/configconnector-operator/channels command: - /configconnector-operator/manager image: operator:latest imagePullPolicy: Always name: manager resources: limits: memory: 1Gi 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: 100m memory: 512Mi securityContext: runAsUser: 1000 runAsNonRoot: true runAsGroup: 1000 capabilities: drop: - all allowPrivilegeEscalation: false enableServiceLinks: false serviceAccountName: configconnector-operator terminationGracePeriodSeconds: 10