# This file is generated by scripts/operator.sh. apiVersion: v1 kind: Namespace metadata: name: starrocks --- # Source: operator/templates/service_account.yaml apiVersion: v1 kind: ServiceAccount metadata: name: starrocks namespace: starrocks --- # Source: operator/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: kube-starrocks-operator labels: app: kube-starrocks-operator rules: - apiGroups: - apps resources: - deployments - statefulsets verbs: - '*' - apiGroups: - autoscaling resources: - horizontalpodautoscalers verbs: - '*' - apiGroups: - batch resources: - cronjobs verbs: - '*' - apiGroups: - "" resources: - configmaps - serviceaccounts - services verbs: - '*' - apiGroups: - "" resources: - endpoints - pods - secrets verbs: - get - list - watch - apiGroups: - starrocks.com resources: - starrocksclusters - starrockswarehouses verbs: - '*' - apiGroups: - starrocks.com resources: - starrocksclusters/status - starrockswarehouses/status verbs: - get - patch - update --- # Source: operator/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kube-starrocks-operator roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: kube-starrocks-operator subjects: - kind: ServiceAccount name: starrocks namespace: starrocks --- # Source: operator/templates/leader-election-role.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: cn-leader-election-role namespace: starrocks rules: - apiGroups: - "" resources: - configmaps verbs: - get - list - watch - create - update - patch - delete - apiGroups: - coordination.k8s.io resources: - leases verbs: - get - list - watch - create - update - patch - delete - apiGroups: - "" resources: - events verbs: - create - patch --- # Source: operator/templates/leader-election-role-binding.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: cn-leader-election-rolebinding namespace: starrocks roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: cn-leader-election-role subjects: - kind: ServiceAccount name: starrocks namespace: starrocks --- # Source: operator/templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: kube-starrocks-operator namespace: starrocks labels: app: kube-starrocks-operator spec: selector: matchLabels: app: kube-starrocks-operator replicas: 1 template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: app: kube-starrocks-operator version: 1.9.4 spec: automountServiceAccountToken: true containers: - command: - /sroperator args: - --leader-elect - --zap-time-encoding=iso8601 - --zap-encoder=console env: - name: TZ value: Asia/Shanghai image: "starrocks/operator:v1.9.4" imagePullPolicy: Always name: manager securityContext: runAsNonRoot: true allowPrivilegeEscalation: false readOnlyRootFilesystem: true livenessProbe: httpGet: path: /healthz port: 8081 initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /readyz port: 8081 initialDelaySeconds: 5 periodSeconds: 10 # TODO(user): Configure the resources accordingly based on the project requirements. # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: limits: cpu: 500m memory: 800Mi requests: cpu: 500m memory: 400Mi serviceAccountName: starrocks terminationGracePeriodSeconds: 10