diff --git a/VERSION b/VERSION index 5719dcb..5c314e5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.0.4-dev \ No newline at end of file +v0.0.5 diff --git a/templates/openmcp/templates/overlays/config/openmcp-operator-config.yaml b/templates/openmcp/templates/overlays/config/openmcp-operator-config.yaml index 0b8e2f4..4305629 100644 --- a/templates/openmcp/templates/overlays/config/openmcp-operator-config.yaml +++ b/templates/openmcp/templates/overlays/config/openmcp-operator-config.yaml @@ -1 +1 @@ -# please fill this out +{{ toYaml .Values.openmcpOperator.config }} diff --git a/templates/openmcp/templates/resources/deployment.yaml b/templates/openmcp/templates/resources/deployment.yaml index 638c5e5..38f4d1b 100644 --- a/templates/openmcp/templates/resources/deployment.yaml +++ b/templates/openmcp/templates/resources/deployment.yaml @@ -16,13 +16,45 @@ spec: labels: app: openmcp-operator spec: + serviceAccount: openmcp-operator initContainers: - - name: openmcp-init + - name: openmcp-operator-init image: :latest args: - init - - --environment=default + - --environment={{ .Values.openmcpOperator.environment }} - --config=/etc/secret/openmcp-operator-config/config + - --provider-name=managedcontrolplane + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: POD_SERVICE_ACCOUNT_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.serviceAccountName + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File volumeMounts: - mountPath: /etc/secret/openmcp-operator-config name: openmcp-operator-config @@ -32,12 +64,30 @@ spec: image: :latest args: - run - - --environment=default + - --environment={{ .Values.openmcpOperator.environment }} - --config=/etc/secret/openmcp-operator-config/config - volumeMounts: - - mountPath: /etc/secret/openmcp-operator-config - name: openmcp-operator-config - readOnly: true + - --provider-name=managedcontrolplane + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: POD_SERVICE_ACCOUNT_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.serviceAccountName resources: requests: cpu: 100m @@ -45,6 +95,12 @@ spec: limits: cpu: 1000m memory: 1024Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /etc/secret/openmcp-operator-config + name: openmcp-operator-config + readOnly: true volumes: - name: openmcp-operator-config secret: diff --git a/templates/openmcp/templates/resources/kustomization.yaml b/templates/openmcp/templates/resources/kustomization.yaml index a918015..06b70b4 100644 --- a/templates/openmcp/templates/resources/kustomization.yaml +++ b/templates/openmcp/templates/resources/kustomization.yaml @@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - rbac.yaml - namespace.yaml - deployment.yaml diff --git a/templates/openmcp/templates/resources/rbac.yaml b/templates/openmcp/templates/resources/rbac.yaml new file mode 100644 index 0000000..3251eb3 --- /dev/null +++ b/templates/openmcp/templates/resources/rbac.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: openmcp-operator + namespace: openmcp-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: openmcp-system:openmcp-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: openmcp-operator + namespace: openmcp-system diff --git a/templates/openmcp/values.yaml b/templates/openmcp/values.yaml index 1988d53..112d0cf 100644 --- a/templates/openmcp/values.yaml +++ b/templates/openmcp/values.yaml @@ -2,3 +2,45 @@ openmcpOperator: image: ghcr.io/openmcp-project/images/openmcp-operator tag: v0.9.1 + environment: dev + config: + managedControlPlane: + mcpClusterPurpose: mcp-worker + reconcileMCPEveryXDays: 7 + scheduler: + scope: Cluster + purposeMappings: + mcp: + template: + spec: + profile: env.cpname.mcpds-workerless + tenancy: Exclusive + mcp-worker: + template: + spec: + profile: env.cpname.mcpds-small + tenancy: Exclusive + platform: + template: + metadata: + labels: + clusters.openmcp.cloud/delete-without-requests: "false" + spec: + profile: env.cpname.mcpd-large + tenancy: Shared + onboarding: + template: + metadata: + labels: + clusters.openmcp.cloud/delete-without-requests: "false" + spec: + profile: env.cpname.mcpd-workerless + tenancy: Shared + workload: + tenancyCount: 20 + template: + metadata: + namespace: workload-clusters + spec: + profile: env.cpname.mcpd-small + tenancy: Shared