Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deployment of orchestrator #81

Merged
merged 4 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ on:
default: 'kindest/node:v1.24.6'
required: false
type: string
upgrade_from:
description: 'Managed service orchestrator service chart version to upgrade from'
# version from 3.1 release
default: '1.4.2'

jobs:
lint-test:
Expand All @@ -51,6 +55,12 @@ jobs:
with:
version: v0.19.0
node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.24.6' }}
- name: Build image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: kind-registry:5000/managed-service-orchestrator:testing

- name: Set up Helm
uses: azure/setup-helm@v3
Expand All @@ -77,9 +87,15 @@ jobs:
- name: Run chart-testing (lint)
run: ct lint --charts charts/orchestrator --config charts/chart-testing-config.yaml

- name: Run helm install

- name: Run chart-testing (install)
run: ct install --charts charts/orchestrator --config charts/chart-testing-config.yaml --helm-extra-set-args "--set=image.tag=testing --set=image.repository=kind-registry:5000/managed-service-orchestrator"
if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'

- name: Run helm upgrade
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev
helm install orchestrator charts/orchestrator --namespace install --create-namespace
helm install orchestrator charts/orchestrator
helm upgrade orchestrator charts/orchestrator
if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'
6 changes: 6 additions & 0 deletions charts/orchestrator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ spec:
value: "3"
- name: RETRY_BACKOFFDELAY
value: "500"
- name: SPRING_DATASOURCE_URL
value: "jdbc:postgresql://{{ .Values.postgresql.fullnameOverride }}:{{ .Values.postgresql.auth.port }}/{{ .Values.postgresql.auth.database }}"
- name: SPRING_DATASOURCE_USERNAME
value: {{ .Values.postgresql.auth.username | required ".Values.postgresql.auth.username is required" | quote }}
- name: SPRING_DATASOURCE_PASSWORD
value: {{ .Values.postgresql.auth.password | required ".Values.postgresql.auth.password is required" | quote}}

resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
97 changes: 97 additions & 0 deletions charts/orchestrator/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#******************************************************************************
# Copyright (c) 2022, 2023 T-Systems International GmbH
# Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://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.
#
# SPDX-License-Identifier: Apache-2.0
#*******************************************************************************

apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ .Values.secretRef }}
stringData:
connectorTestServiceUrl: default
connectorregisterUrl: default
connectorregisterkeycloakclientId: default
connectorregisterkeycloakclientSecret: default
connectorregisterkeycloaktokenURI: default
dapsJksUrl: default
dapsTokenUrl: default
dapsUrl: default
#dbUrl: jdbc:postgresql://postgresql:5432/postgres
#dbpassword: default
#dbuser: postgres
dnsname: default
dnsnameProtocol: default
edc_miwUrl: default
edc_ssi_authorityId: default
emailpassword: default
emailuser: default
keycloakAuthserverUrl: default
keycloakBearerOnly: "true"
keycloakClientid: default
keycloakRealm: default
keycloakResource: default
keycloakSslRequired: external
keycloakUseResourceRoleMappings: "true"
kubeappsToken: default
kubeappsUrl: default
mail_from: default
mail_to: default
manual-connector-registration: "false"
manualupdate: "true"
password: default
portalclientid: default
portalclientsecret: default
portalemail: default
portaltokenurl: default
portalurl: default
postgres-password: default
resourceServerIssuer: default
sde_bpndiscovery-hostname: default
sde_connector-discovery-clientId: default
sde_connector-discovery-clientSecret: default
sde_connector-discovery-token-url: default
sde_digital-twins-authentication-url: default
sde_digital-twins-hostname: default
sde_discovery-authentication-url: default
sde_discovery-clientId: default
sde_discovery-clientSecret: default
sde_discovery-grantType: default
sde_dtregistry-url-prefix: default
sde_dtregistryidp-client-id: default
sde_dtregistrytenant-id: default
sde_keycloak-auth: default
sde_keycloak-realm: default
sde_keycloak-tokenUrl: default
sde_partner-pool-clientId: default
sde_partner-pool-clientSecret: default
sde_partner-pool-hostname: default
sde_portal-backend-authentication-url: default
sde_portal-backend-clientId: default
sde_portal-backend-clientSecret: default
sde_portal-backend-hostname: default
sde_resource-server-issuer: default
smtp_auth: "true"
smtp_host: default
smtp_port: default
smtp_tls_enable: "true"
targetCluster: default
targetNamesapce: default
vaultToken: default
vaultUrl: default

16 changes: 6 additions & 10 deletions charts/orchestrator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,14 @@ readinessProbe:
successThreshold: 1
timeoutSeconds: 1

secretRef: ""
secretRef: "managed-service-orchestrator"

postgresql:
# -- Enable the dependency postgres database
enabled: true
metrics:
containerSecurityContext:
enabled: false
fullnameOverride: "postgresql"
auth:
username: ""
database: ""
username: "postgres"
password: "default"
database: "postgres"
port: 5432
existingSecret: ""
secretKeys:
adminPasswordKey: ""
userPasswordKey: ""