diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 0f639968..edafba8b 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -44,4 +44,4 @@ sources: # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.4.0 +version: 4.0.0 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 900edc44..f2d47c80 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -2,7 +2,7 @@ # RHDH Backstage Helm Chart for OpenShift (Community Version) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/rhdh-chart&style=flat-square)](https://artifacthub.io/packages/search?repo=rhdh-chart) -![Version: 3.4.0](https://img.shields.io/badge/Version-3.4.0-informational?style=flat-square) +![Version: 4.0.0](https://img.shields.io/badge/Version-4.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for deploying Red Hat Developer Hub. @@ -191,6 +191,20 @@ Kubernetes: `>= 1.25.0-0` | global.dynamic.includes[0] | List of dynamic plugins included inside the `janus-idp/backstage-showcase` container image, some of which are disabled by default. This file ONLY works with the `janus-idp/backstage-showcase` container image. | string | `"dynamic-plugins.default.yaml"` | | global.dynamic.plugins | List of dynamic plugins, possibly overriding the plugins listed in `includes` files. Every item defines the plugin `package` as a [NPM package spec](https://docs.npmjs.com/cli/v10/using-npm/package-spec), an optional `pluginConfig` with plugin-specific backstage configuration, and an optional `disabled` flag to disable/enable a plugin listed in `includes` files. It also includes an `integrity` field that is used to verify the plugin package [integrity](https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description). | list | `[]` | | global.host | Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig`. | string | `""` | +| orchestrator.enabled | | bool | `false` | +| orchestrator.serverlessLogicOperator.enabled | | bool | `false` | +| orchestrator.serverlessOperator.enabled | | bool | `false` | +| orchestrator.sonataflowPlatform.createDBJobImage | Image for the container used by the create-db job | string | `"postgres:15"` | +| orchestrator.sonataflowPlatform.eventing.broker.name | | string | `""` | +| orchestrator.sonataflowPlatform.eventing.broker.namespace | | string | `""` | +| orchestrator.sonataflowPlatform.externalDBName | Name for the user-configured external Database | string | `""` | +| orchestrator.sonataflowPlatform.externalDBsecretRef | Secret name for the user-created secret to connect an external DB | string | `""` | +| orchestrator.sonataflowPlatform.initContainerImage | Image for the init container used by the create-db job | string | `"busybox"` | +| orchestrator.sonataflowPlatform.monitoring.enabled | | bool | `true` | +| orchestrator.sonataflowPlatform.resources.limits.cpu | | string | `"500m"` | +| orchestrator.sonataflowPlatform.resources.limits.memory | | string | `"1Gi"` | +| orchestrator.sonataflowPlatform.resources.requests.cpu | | string | `"250m"` | +| orchestrator.sonataflowPlatform.resources.requests.memory | | string | `"64Mi"` | | route | OpenShift Route parameters | object | `{"annotations":{},"enabled":true,"host":"{{ .Values.global.host }}","path":"/","tls":{"caCertificate":"","certificate":"","destinationCACertificate":"","enabled":true,"insecureEdgeTerminationPolicy":"Redirect","key":"","termination":"edge"},"wildcardPolicy":"None"}` | | route.annotations | Route specific annotations | object | `{}` | | route.enabled | Enable the creation of the route resource | bool | `true` | @@ -320,3 +334,30 @@ upstream: volumePermissions: enabled: true ``` + +## Installing RHDH with Orchestrator + +Orchestrator brings serverless workflows into Backstage, focusing on the journey for application migration to the cloud, on boarding developers ,and user-made workflows of Backstage actions or external systems. +Orchestrator is a flavor of RHDH, and can be installed alongside the RHDH in the same namespace and in the folloing way: + +1. Have an admin install the orchestrator-infra helm chart, which will install the pre-requisites required to install RHDH flavored Orchestrator. This proccess will include installing cluster-wide resources, so should be done with admin privileges +``` +helm install charts/orchestrator-infra +``` +2. Manually approve the Install Plans created by the chart, and wait for the Openshift Serverless and Openshift Serverless Logic Operators to be deployed. +3. Install backstage chart with helm, setting orchestrator to be enabled. +4. Enable serverlessLogicOperator and serverlessOperator in the backstage values. + +To use orchestrator with an external DB, please follow the instructions in [our documentation](https://github.com/redhat-developer/rhdh-chart/blob/main/docs/external-db.md) +and populate the following values in the values.yaml: +```bash + externalDBsecretRef: + externalDBName: "" +``` +Please note that externalDBName is the name of the user-configured existing database, not the database that orchestrator and sonataflow resources will use. + +Finally, install the helm chart: +``` +helm install charts/backstage --set orchestrator.enabled=true --set orchestrator.serverlessLogicOperator.enabled=true --set orchestrator.serverlessOperator.enabled=true \ +--set externalDBsecretRef= --set externalDBName=example +``` \ No newline at end of file diff --git a/charts/backstage/README.md.gotmpl b/charts/backstage/README.md.gotmpl index 6b7e0a4c..fd7ba75a 100644 --- a/charts/backstage/README.md.gotmpl +++ b/charts/backstage/README.md.gotmpl @@ -269,3 +269,30 @@ upstream: volumePermissions: enabled: true ``` + +## Installing RHDH with Orchestrator + +Orchestrator brings serverless workflows into Backstage, focusing on the journey for application migration to the cloud, on boarding developers ,and user-made workflows of Backstage actions or external systems. +Orchestrator is a flavor of RHDH, and can be installed alongside the RHDH in the same namespace and in the folloing way: + +1. Have an admin install the orchestrator-infra helm chart, which will install the pre-requisites required to install RHDH flavored Orchestrator. This proccess will include installing cluster-wide resources, so should be done with admin privileges +``` +helm install charts/orchestrator-infra +``` +2. Manually approve the Install Plans created by the chart, and wait for the Openshift Serverless and Openshift Serverless Logic Operators to be deployed. +3. Install backstage chart with helm, setting orchestrator to be enabled. +4. Enable serverlessLogicOperator and serverlessOperator in the backstage values. + +To use orchestrator with an external DB, please follow the instructions in [our documentation](https://github.com/redhat-developer/rhdh-chart/blob/main/docs/external-db.md) +and populate the following values in the values.yaml: +```bash + externalDBsecretRef: + externalDBName: "" +``` +Please note that externalDBName is the name of the user-configured existing database, not the database that orchestrator and sonataflow resources will use. + +Finally, install the helm chart: +``` +helm install charts/backstage --set orchestrator.enabled=true --set orchestrator.serverlessLogicOperator.enabled=true --set orchestrator.serverlessOperator.enabled=true \ +--set externalDBsecretRef= --set externalDBName=example +``` \ No newline at end of file diff --git a/charts/backstage/templates/_helpers.tpl b/charts/backstage/templates/_helpers.tpl index a6cd9cff..b1210191 100644 --- a/charts/backstage/templates/_helpers.tpl +++ b/charts/backstage/templates/_helpers.tpl @@ -47,4 +47,4 @@ Referenced from: https://github.com/bitnami/charts/blob/main/bitnami/postgresql/ {{- else -}} {{- printf "%s" (include "common.names.fullname" .) -}} {{- end -}} -{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/backstage/templates/_partials.tpl b/charts/backstage/templates/_partials.tpl new file mode 100644 index 00000000..e36be41b --- /dev/null +++ b/charts/backstage/templates/_partials.tpl @@ -0,0 +1,49 @@ +{{- define "orchestrator.plugins" }} +{{- $config := include "orchestrator.plugins.config" . | fromYaml }} +plugins: + - disabled: false + package: "{{ $config.orchestratorPlugins.scope }}/{{ $config.orchestratorPlugins.orchestratorBackend.package }}" + integrity: "{{ $config.orchestratorPlugins.orchestratorBackend.integrity }}" + pluginConfig: + orchestrator: + dataIndexService: + url: http://sonataflow-platform-data-index-service.{{ .Release.Namespace }} + - disabled: false + package: "{{ $config.orchestratorPlugins.scope }}/{{ $config.orchestratorPlugins.orchestrator.package }}" + integrity: "{{ $config.orchestratorPlugins.orchestrator.integrity }}" + pluginConfig: + dynamicPlugins: + frontend: + red-hat-developer-hub.backstage-plugin-orchestrator: + appIcons: + - importName: OrchestratorIcon + module: OrchestratorPlugin + name: orchestratorIcon + dynamicRoutes: + - importName: OrchestratorPage + menuItem: + icon: orchestratorIcon + text: Orchestrator + module: OrchestratorPlugin + path: /orchestrator + - disabled: true + package: "{{ $config.orchestratorPlugins.scope }}/{{ $config.orchestratorPlugins.scaffolderBackendOrchestrator.package }}" + integrity: "{{ $config.orchestratorPlugins.scaffolderBackendOrchestrator.integrity }}"{{- end }} + pluginConfig: + orchestrator: + dataIndexService: + url: http://sonataflow-platform-data-index-service.{{ .Release.Namespace }} + +{{- define "orchestrator.plugins.config" }} +orchestratorPlugins: + scope: "@redhat" + orchestrator: + package: "backstage-plugin-orchestrator@1.5.1" + integrity: sha512-7VOe+XGTUzrdO/av0DNHbydOjB3Lo+XdCs6fj3JVODLP7Ypd3GXHf/nssYxG5ZYC9F1t9MNeguE2bZOB6ckqTA== + orchestratorBackend: + package: "backstage-plugin-orchestrator-backend-dynamic@1.5.1" + integrity: sha512-VIenFStdq9QvvmgmEMG8O7b2wqIebvEcqNeJ9SWZ8jen9t+efTK6D3Rde74LQ1no1QaHLx8RoxNCOuTUEF8O/g== + scaffolderBackendOrchestrator: + package: "backstage-plugin-scaffolder-backend-module-orchestrator-dynamic@1.5.1" + integrity: sha512-bnVQjVsUZ470Vgm2kd5Lo/bVa2fF0q4GufBDc/8oTQsnP3zZJQqKFvFElBTCjY76RqkECydlvZ1UFybSzvockQ== +{{- end }} \ No newline at end of file diff --git a/charts/backstage/templates/dynamic-plugins-configmap.yaml b/charts/backstage/templates/dynamic-plugins-configmap.yaml index 1239a67b..a8af0614 100644 --- a/charts/backstage/templates/dynamic-plugins-configmap.yaml +++ b/charts/backstage/templates/dynamic-plugins-configmap.yaml @@ -4,5 +4,33 @@ metadata: name: {{ printf "%s-dynamic-plugins" .Release.Name }} data: dynamic-plugins.yaml: | - {{- include "common.tplvalues.render" ( dict "value" - .Values.global.dynamic "context" $) | nindent 4 }} + {{- $dynamic := deepCopy .Values.global.dynamic }} + {{- $plugins := list }} + + {{- range .Values.global.dynamic.plugins }} + {{- $plugins = append $plugins . }} + {{- end }} + + {{- if .Values.orchestrator.enabled }} + {{- $orchestratorPlugins := include "orchestrator.plugins" . | fromYaml }} + {{- range $orchestratorPlugins.plugins }} + {{- $plugins = append $plugins . }} + {{- end }} + {{- end }} + + {{- $_ := set $dynamic "plugins" $plugins }} + + {{- include "common.tplvalues.render" (dict "value" $dynamic "context" $) | nindent 4 }} + +--- +{{- if .Values.orchestrator.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Release.Name}}-dynamic-plugins-npmrc + namespace: {{ .Release.Namespace }} +type: Opaque +stringData: + .npmrc: | + @redhat:registry=https://npm.registry.redhat.com +{{- end }} \ No newline at end of file diff --git a/charts/backstage/templates/network-policies.yaml b/charts/backstage/templates/network-policies.yaml new file mode 100644 index 00000000..1979e4f3 --- /dev/null +++ b/charts/backstage/templates/network-policies.yaml @@ -0,0 +1,74 @@ +{{- if and .Values.orchestrator.enabled .Values.orchestrator.serverlessLogicOperator.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ .Release.Name }}-allow-knative-to-sonataflow-and-workflows + # Sonataflow and Workflows are using the RHDH target namespace. + namespace: {{ .Release.Namespace | quote }} +spec: + podSelector: {} + ingress: + - from: + - namespaceSelector: + matchLabels: + # Allow knative events to be delivered to workflows. + kubernetes.io/metadata.name: knative-eventing + - namespaceSelector: + matchLabels: + # Allow auxiliary knative function for workflow (such as m2k-save-transformation) + kubernetes.io/metadata.name: knative-serving +--- +# NetworkPolicy to unblock incoming traffic to the namespace +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ .Release.Name }}-allow-external-communication + namespace: {{ .Release.Namespace | quote }} +spec: + podSelector: {} + ingress: + - from: + - namespaceSelector: + matchLabels: + # Allow knative events to be delivered to workflows. + kubernetes.io/metadata.name: openshift-ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ .Release.Name }}-allow-intra-network + namespace: {{ .Release.Namespace | quote }} +spec: + # Apply this policy to all pods in the namespace + podSelector: {} + # Specify policy type as 'Ingress' to control incoming traffic rules + policyTypes: + - Ingress + ingress: + - from: + # Allow ingress from any pod within the same namespace + - podSelector: {} + + +{{- end }} +--- +{{- if and .Values.orchestrator.enabled .Values.orchestrator.sonataflowPlatform.monitoring.enabled }} +# NetworkPolicy to allow openshift-user-workload-monitoring pods to access all pods within the workflow's namespace +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ .Release.Name }}-allow-monitoring-to-sonataflow-and-workflows + namespace: {{ .Release.Namespace | quote }} +spec: + # Apply this policy to all pods in the namespace + podSelector: {} + # Specify policy type as 'Ingress' to control incoming traffic rules + policyTypes: + - Ingress + ingress: + - from: + - namespaceSelector: + matchLabels: + # Allow openshift-user-workload-monitoring pods to access the workflow. + kubernetes.io/metadata.name: openshift-user-workload-monitoring +{{- end }} \ No newline at end of file diff --git a/charts/backstage/templates/sonataflows.yaml b/charts/backstage/templates/sonataflows.yaml new file mode 100644 index 00000000..aec16d17 --- /dev/null +++ b/charts/backstage/templates/sonataflows.yaml @@ -0,0 +1,133 @@ +{{- if and (default false .Values.orchestrator.enabled) (default false .Values.orchestrator.serverlessLogicOperator.enabled) }} +{{- $sonataflowplatformExists := lookup "sonataflow.org/v1alpha08" "SonataFlowPlatform" .Release.Namespace "sonataflow-platform" }} +{{- if and .Release.IsInstall $sonataflowplatformExists }} +{{- fail "Cannot create multiple sonataflowplatform in the same namespace, one already exists." }} +{{- end }} + +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlowPlatform +metadata: + name: sonataflow-platform + namespace: {{ .Release.Namespace }} +spec: + monitoring: + enabled: {{ .Values.orchestrator.sonataflowPlatform.monitoring.enabled }} + build: + template: + resources: + requests: + memory: {{ .Values.orchestrator.sonataflowPlatform.resources.requests.memory }} + cpu: {{ .Values.orchestrator.sonataflowPlatform.resources.requests.cpu }} + limits: + memory: {{ .Values.orchestrator.sonataflowPlatform.resources.limits.memory }} + cpu: {{ .Values.orchestrator.sonataflowPlatform.resources.limits.cpu }} + {{- if (and (.Values.orchestrator.sonataflowPlatform.eventing.broker.name) (.Values.orchestrator.sonataflowPlatform.eventing.broker.namespace)) }} + eventing: + broker: + ref: + apiVersion: eventing.knative.dev/v1 + kind: Broker + name: {{ .Values.orchestrator.sonataflowPlatform.eventing.broker.name }} + namespace: {{ .Values.orchestrator.sonataflowPlatform.eventing.broker.namespace }} + {{- end }} + services: + dataIndex: + enabled: true + persistence: + postgresql: + {{- if .Values.upstream.postgresql.enabled }} + secretRef: + name: {{ .Release.Name }}-postgresql-svcbind-postgres + userKey: username + passwordKey: password + serviceRef: + name: {{ .Release.Name }}-postgresql + namespace: {{ .Release.Namespace }} + databaseName: sonataflow + {{- else }} + secretRef: + name: {{ .Values.orchestrator.sonataflowPlatform.externalDBsecretRef }} + userKey: POSTGRES_USER + passwordKey: POSTGRES_PASSWORD + jdbcUrl: jdbc:postgresql://{{ .Values.upstream.backstage.appConfig.backend.database.connection.host}}:{{ .Values.upstream.backstage.appConfig.backend.database.connection.port}}/sonataflow?currentSchema=data-index-service + {{- end }} + {{- if .Values.orchestrator.sonataflowPlatform.dataIndexImage }} + podTemplate: + container: + image: {{ .Values.orchestrator.sonataflowPlatform.dataIndexImage }} + {{- end }} + jobService: + enabled: true + persistence: + postgresql: + {{- if .Values.upstream.postgresql.enabled }} + secretRef: + name: {{ .Release.Name }}-postgresql-svcbind-postgres + userKey: username + passwordKey: password + serviceRef: + name: {{ .Release.Name }}-postgresql + namespace: {{ .Release.Namespace }} + databaseName: sonataflow + {{- else }} + secretRef: + name: {{ .Values.orchestrator.sonataflowPlatform.externalDBsecretRef}} + userKey: POSTGRES_USER + passwordKey: POSTGRES_PASSWORD + jdbcUrl: jdbc:postgresql://{{ .Values.upstream.backstage.appConfig.backend.database.connection.host}}:{{ .Values.upstream.backstage.appConfig.backend.database.connection.port}}/sonataflow?currentSchema=jobs-service + {{- end }} + {{- if .Values.orchestrator.sonataflowPlatform.jobServiceImage }} + podTemplate: + container: + image: {{ .Values.orchestrator.sonataflowPlatform.jobServiceImage }} + {{- end }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ .Release.Name }}-create-sonataflow-database + namespace: {{ .Release.Namespace }} +spec: + template: + spec: + initContainers: + - name: wait-for-db + image: {{ .Values.orchestrator.sonataflowPlatform.initContainerImage }} + command: + - sh + - -c +{{- if .Values.upstream.postgresql.enabled }} + - "until nc -z {{ .Release.Name }}-postgresql 5432; do echo 'Waiting for DB...'; sleep 2; done" +{{- else }} + - "until nc -z {{ .Values.upstream.backstage.appConfig.backend.database.connection.host }} {{ .Values.upstream.backstage.appConfig.backend.database.connection.port }}; do echo 'Waiting for external DB...'; sleep 2; done" +{{- end }} + containers: + - name: psql + image: {{ .Values.orchestrator.sonataflowPlatform.createDBJobImage }} + env: + - name: PGPASSWORD + valueFrom: +{{- if .Values.upstream.postgresql.enabled }} + secretKeyRef: + name: {{ .Release.Name }}-postgresql-svcbind-postgres + key: password + command: [ "sh", "-c" ] + args: + - "psql -h {{ .Release.Name }}-postgresql -U postgres -c 'CREATE DATABASE sonataflow;' || echo WARNING: Could not create database" +{{- else }} + secretKeyRef: + name: {{ .Values.orchestrator.sonataflowPlatform.externalDBsecretRef}} + key: POSTGRES_PASSWORD + command: [ "sh", "-c" ] + args: + - "psql -h {{ .Values.upstream.backstage.appConfig.backend.database.connection.host }} -U {{ .Values.upstream.backstage.appConfig.backend.database.connection.user }} -d {{ .Values.orchestrator.sonataflowPlatform.externalDBName }} -c 'CREATE DATABASE sonataflow;' || echo WARNING: Could not create database" +{{- end }} + restartPolicy: Never + backoffLimit: 2 +{{- end }} + + + + + + diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 44b14c44..21be2ae2 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -91,6 +91,146 @@ }, "type": "object" }, + "orchestrator": { + "additionalProperties": false, + "properties": { + "enabled": { + "default": false, + "title": "enabled flag", + "type": "boolean" + }, + "serverlessLogicOperator": { + "additionalProperties": false, + "properties": { + "enabled": { + "default": false, + "title": "enabled flag", + "type": "boolean" + } + }, + "title": "serverlessLogicOperator configuration", + "type": "object" + }, + "serverlessOperator": { + "additionalProperties": false, + "properties": { + "enabled": { + "default": false, + "title": "enabled flag", + "type": "boolean" + } + }, + "title": "serverlessOperator configuration", + "type": "object" + }, + "sonataflowPlatform": { + "additionalProperties": false, + "properties": { + "createDBJobImage": { + "additionalProperties": false, + "title": "Image for the container used by the create-db job", + "type": "string" + }, + "eventing": { + "additionalProperties": false, + "properties": { + "broker": { + "additionalProperties": false, + "properties": { + "name": { + "default": "", + "title": "name value", + "type": "string" + }, + "namespace": { + "default": "", + "title": "namespace value", + "type": "string" + } + }, + "title": "broker configuration", + "type": "object" + } + }, + "title": "eventing configuration", + "type": "object" + }, + "externalDBName": { + "additionalProperties": false, + "title": "Name for the user-configured external Database", + "type": "string" + }, + "externalDBsecretRef": { + "additionalProperties": false, + "title": "Secret name for the user-created secret to connect an external DB", + "type": "string" + }, + "initContainerImage": { + "additionalProperties": false, + "title": "Image for the init container used by the create-db job", + "type": "string" + }, + "monitoring": { + "additionalProperties": false, + "properties": { + "enabled": { + "default": true, + "title": "enabled flag", + "type": "boolean" + } + }, + "title": "monitoring configuration", + "type": "object" + }, + "resources": { + "additionalProperties": false, + "properties": { + "limits": { + "additionalProperties": false, + "properties": { + "cpu": { + "default": "500m", + "title": "cpu value", + "type": "string" + }, + "memory": { + "default": "1Gi", + "title": "memory value", + "type": "string" + } + }, + "title": "limits configuration", + "type": "object" + }, + "requests": { + "additionalProperties": false, + "properties": { + "cpu": { + "default": "250m", + "title": "cpu value", + "type": "string" + }, + "memory": { + "default": "64Mi", + "title": "memory value", + "type": "string" + } + }, + "title": "requests configuration", + "type": "object" + } + }, + "title": "resources configuration", + "type": "object" + } + }, + "title": "sonataflowPlatform configuration", + "type": "object" + } + }, + "title": "orchestrator configuration", + "type": "object" + }, "route": { "additionalProperties": false, "properties": { diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index 61b8efc8..73110f0c 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -59,7 +59,9 @@ "default": false } }, - "required": ["package"] + "required": [ + "package" + ] } }, "includes": { @@ -110,7 +112,7 @@ "properties": { "annotations": { "title": "Route specific annotations.", - "type": "object", + "type": "object", "default": {} }, "enabled": { @@ -193,6 +195,146 @@ } } } + }, + "orchestrator": { + "title": "orchestrator configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "title": "enabled flag", + "type": "boolean", + "default": false + }, + "serverlessLogicOperator": { + "title": "serverlessLogicOperator configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "title": "enabled flag", + "type": "boolean", + "default": true + } + } + }, + "serverlessOperator": { + "title": "serverlessOperator configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "title": "enabled flag", + "type": "boolean", + "default": true + } + } + }, + "sonataflowPlatform": { + "title": "sonataflowPlatform configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "monitoring": { + "title": "monitoring configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "title": "enabled flag", + "type": "boolean", + "default": true + } + } + }, + "eventing": { + "title": "eventing configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "broker": { + "title": "broker configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "title": "name value", + "type": "string", + "default": "" + }, + "namespace": { + "title": "namespace value", + "type": "string", + "default": "" + } + } + } + } + }, + "resources": { + "title": "resources configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "requests": { + "title": "requests configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "memory": { + "title": "memory value", + "type": "string", + "default": "64Mi" + }, + "cpu": { + "title": "cpu value", + "type": "string", + "default": "250m" + } + } + }, + "limits": { + "title": "limits configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "memory": { + "title": "memory value", + "type": "string", + "default": "1Gi" + }, + "cpu": { + "title": "cpu value", + "type": "string", + "default": "500m" + } + } + } + } + }, + "externalDBsecretRef": { + "title": "Secret name for the user-created secret to connect an external DB", + "type": "string", + "additionalProperties": false + }, + "externalDBName": { + "title": "Name for the user-configured external Database", + "type": "string", + "additionalProperties": false + }, + "initContainerImage": { + "title": "Image for the init container used by the create-db job", + "type": "string", + "additionalProperties": false + }, + "createDBJobImage": { + "title": "Image for the container used by the create-db job", + "type": "string", + "additionalProperties": false + } + } + } + } } } -} +} \ No newline at end of file diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index 403b5a93..81080365 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -243,6 +243,8 @@ upstream: postgresql: enabled: true postgresqlDataDir: /var/lib/pgsql/data/userdata + serviceBindings: + enabled: true image: registry: quay.io repository: fedora/postgresql-15 @@ -338,3 +340,35 @@ test: # -- Test connection pod image tag. Note that the image needs to have both the `sh` and `curl` binaries in it. tag: latest + +orchestrator: + enabled: false + serverlessLogicOperator: + enabled: false + serverlessOperator: + enabled: false + sonataflowPlatform: + monitoring: + enabled: true + eventing: + broker: + name: "" + namespace: "" + resources: + requests: + memory: "64Mi" + cpu: "250m" + limits: + memory: "1Gi" + cpu: "500m" + # -- Secret name for the user-created secret to connect an external DB + externalDBsecretRef: "" + + # -- Name for the user-configured external Database + externalDBName: "" + + # -- Image for the init container used by the create-db job + initContainerImage: busybox + + # -- Image for the container used by the create-db job + createDBJobImage: "postgres:15" diff --git a/charts/orchestrator-infra/Chart.yaml b/charts/orchestrator-infra/Chart.yaml index d191a570..50631e9b 100644 --- a/charts/orchestrator-infra/Chart.yaml +++ b/charts/orchestrator-infra/Chart.yaml @@ -14,4 +14,4 @@ maintainers: type: application sources: - https://github.com/redhat-developer/rhdh-chart -version: 0.0.4 +version: 0.0.5 diff --git a/charts/orchestrator-infra/README.md b/charts/orchestrator-infra/README.md index c6556b8e..f1d519f6 100644 --- a/charts/orchestrator-infra/README.md +++ b/charts/orchestrator-infra/README.md @@ -1,7 +1,7 @@ # Orchestrator Infra Chart for OpenShift (Community Version) -![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) +![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Helm chart to deploy the Orchestrator solution's required infrastructure suite on OpenShift, including OpenShift Serverless Operator and OpenShift Serverless Logic Operator, both required to configure Red Hat Developer Hub to use the Orchestrator. diff --git a/charts/orchestrator-infra/templates/NOTES.txt b/charts/orchestrator-infra/templates/NOTES.txt index 00676355..1897ccb6 100644 --- a/charts/orchestrator-infra/templates/NOTES.txt +++ b/charts/orchestrator-infra/templates/NOTES.txt @@ -33,7 +33,7 @@ Red Hat Serverless Logic Operator {{ $serverlessLogicOperatorInstalled }} To manually approve the openshift-serverless InstallPlan: -OS_PLAN=$(oc get installplan -n openshift-serverless) +OS_PLAN=$(oc get installplan -n openshift-serverless --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[0].metadata.name}') oc patch installplan $OS_PLAN -n openshift-serverless --type merge --patch '{"spec":{"approved":true}}' {{- end }} @@ -41,6 +41,6 @@ oc patch installplan $OS_PLAN -n openshift-serverless --type merge --patch '{"sp To manually approve the openshift-serverless-logic InstallPlan: -OSL_PLAN=$(oc get installplan -n openshift-serverless) -oc patch installplan $OSL_PLAN -n openshift-serverless --type merge --patch '{"spec":{"approved":true}}' +OSL_PLAN=$(oc get installplan -n openshift-serverless-logic --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[0].metadata.name}') +oc patch installplan $OSL_PLAN -n openshift-serverless-logic --type merge --patch '{"spec":{"approved":true}}' {{- end }}