diff --git a/README.md b/README.md index 64cf7aaf8223cbf172bf0f88851a50484fc87f0c..de4da8d424d8336eed2c662bf3e74e2b4748dac8 100644 --- a/README.md +++ b/README.md @@ -11,168 +11,36 @@ This repository contains the resources required to setup the Infrastructure Prov The installation uses [Helm](https://helm.sh/docs/intro/install/) and requires a running Kubernetes cluster. -Each component is installed through a separate chart and [manifests](./k8s) are provided for additional configuration needs. +The two charts which need to be installed in the cluster: + * `dependencies` installs and configures the required k8s controllers and CRDs + * `resources` installs the required resources that implement provisioner logic -### Crossplane installation and configuration - -#### Install Crossplane from the official repository -```cmd -helm repo add crossplane-stable https://charts.crossplane.io/stable -helm repo update -helm install crossplane --create-namespace -n crossplane-system crossplane-stable/crossplane --version 1.16.2 -``` - -#### Create Secret for EC image registry access -<i>This secret needs to be created in all the namespaces it needs to be accessed from.<br></i> -1. Crossplane namespace -```cmd -kubectl create -n crossplane-system secret ec-pull-secret \ - --docker-server=code.europa.eu:4567 \ - --docker-username=DOCKER_USER \ - --docker-password=DOCKER_PASSWORD \ -``` -2. ArgoWorkflows namespace -```cmd -kubectl create -n argowf secret ec-pull-secret \ - --docker-server=code.europa.eu:4567 \ - --docker-username=DOCKER_USER \ - --docker-password=DOCKER_PASSWORD \ -``` - -#### Configure Crossplane by appling the configuration manifest -<i>This will install the cloud providers and CRDs necessary for the provisioner.</i> -```cmd -kubectl apply -n crossplane-system -f k8s/crossplane-configuration.yaml -``` - -#### Create Secrets for each installed cloud provider. -<i>1. For the IONOS provider, ensure the auth token is set to the IONOS_TOKEN environment variable</i> -```cmd -kubectl create -n crossplane-system secret generic ionos-provider --from-literal=credentials="{\"token\":\"${IONOS_TOKEN}\"}" -``` - -#### Create Provider Configurations for each installed providers. -<i>This links the authentication Secrets created earlier to the providers.</i> -```cmd -kubectl apply -n crossplane-system -f k8s/provider-ionos-configuration.yaml -``` - -### ArgoCD installation and setup - -#### Install ArgoCD with the wrapper Chart -```cmd -helm repo add argo-cd https://argoproj.github.io/argo-helm -helm dependency build charts/argocd -helm install argocd -n argocd --create-namespace charts/argocd -``` - -#### Configure ArgoCD to track deployment scripts - -```cmd -kubectl apply -n argocd -f k8s/argocd-claim-manager.yaml -``` - -Use EXTERNAL-IP to access the provisioner ArgoCD UI: -```cmd -kubectl get -n argocd svc argocd-server -``` -``` -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -argocd-server LoadBalancer 100.64.44.75 87.106.134.9 80:32679/TCP,443:30173/TCP 4h57m -``` - -### ArgoEvents installation - -#### Install ArgoEvents with the wrapper Chart -```cmd -helm dependency build charts/argoev -helm install argoev --create-namespace -n argoev charts/argoev -``` - -### ArgoWorkflows installation - -#### Install ArgoWorkflows with the wrapper Chart -```cmd -helm dependency build charts/argowf -helm install argowf --create-namespace -n argowf charts/argowf -``` - -#### Optionally, if the CLI service account is enabled, get the access token for the Argo Workflows UI - -```cmd -kubectl apply -n argowf -f workflows/cli-token.yaml -echo "Bearer $(kubectl get -n argowf secret cli.service-account-token -o=jsonpath='{.data.token}' | base64 --decode)" > argowftoken -``` - -### Finalize the setup - -#### Apply the manifests to setup the event processing pipeline +Before running helm install ensure that the following `secrets` are present: + * `ec-pull-secret` allows the installer or the argo workflows to pull the necessary images from code.europa.eu (EC_USERNAME: gitlab username, EC_PASSWORD: gitlab password or token) + * `ionos-provider` access token for the Ionos cloud API + * `gitea-secret` internal to the provisioner, used in the gitops process (will be removed in the future) ```cmd -kubectl apply -f k8s/rbac/argocd-application-rbac.yaml -kubectl apply -f k8s/rbac/crossplane-composites.yaml -kubectl apply -f k8s/events/eventbus.yaml -kubectl apply -f k8s/events/source-kafka.yaml -kubectl apply -f k8s/events/sensor-kafka.yaml -kubectl apply -f k8s/events/source-wf-status.yaml -kubectl apply -f k8s/events/sensor-wf-status.yaml -kubectl apply -f k8s/events/source-composite-status.yaml -kubectl apply -f k8s/events/sensor-composite-status.yaml +NS=infrastructure +kubectl create -n $NS secret docker-registry "ec-pull-secret" --docker-server="code.europa.eu:4567" --docker-username="$EC_USERNAME" --docker-password="$EC_PASSWORD" +kubectl create -n $NS secret generic ionos-provider --from-literal=credentials="{\"token\":\"${IONOS_TOKEN}\"}" +kubectl create -n $NS secret generic gitea-secret --from-literal=username=gitops_test --from-literal=password=test1234 ``` -## Building the Crossplane Configuration - -#### Requirements - * [Crossplane CLI](https://docs.crossplane.io/latest/cli/) - -By itself, Crossplane has no means of provisioning cloud infrastructure. A [Configuration Package](https://docs.crossplane.io/latest/concepts/packages/) will be built and used to extend it's capabilities with custom functionality. - -The resources included in this configuration are defined in the [package](./package/apis/) directory. Other dependencies and constraints such as the required providers or the minimum crossplane version are defined in the [Configuration Definition File](./package/crossplane.yaml) - -To build this configuration package into an [OCI Image](https://specs.opencontainers.org/image-spec/) which can be pushed to an image registry, use the CrossplaneCLI tool. - -```cmd -crossplane xpkg build -f package/ -e package/examples/ -o configuration-${VERSION}.xpkg --verbose -``` -```cmd -crossplane xpkg push code.europa.eu:4567/simpl/simpl-open/development/infrastructure/infrastructure-crossplane/configuration:${VERSION} -f configuration-${VERSION}.xpkg --domain https://code.europa.eu -``` - -## Gitea installation and setup (wip) - -### Install Gitea with the wrapper chart -```cmd -helm repo add gitea-charts https://dl.gitea.com/charts/ -helm dependency build charts/gitea -helm install gitea --create-namespace -n gitea charts/gitea -``` - -### Setting up repos -In the Gitea UI, create the two repos with the following names, and clone them locally at a separate location. - -- `management-repo` -- `data-repo` - -Copy contents of templates from this repo to the new repos and push the changes. -```cmd -cp -r .gitea/argocd-repos/data-repo/ cloned-location/data-repo/ -cp -r .gitea/argocd-repos/management-repo-repo/ cloned-location/management-repo/ -``` - -Create a secret for in the namespace of the ArgoWorkflows installation, so that workflows can access the repositories. -```cmd -kubectl create -n argowf secret generic gitea-secret --from-literal=username=gitops_test --from-literal=password=test1234 -``` - -The repositories should now be setup to work with the Argo stack. - ## Local setup #### To setup locally, install [KinD](https://kind.sigs.k8s.io/) to setup a local K8s cluster. Then run the `local-setup.sh` script to setup your environment. -#### Accessing the UIs of the components requires port forwarding: +#### Accessing the UIs of the components: +Retrieve initial admin password for ArgoCD and Auth Token for ArgoWorkflows ```cmd -kubectl port-forward -n argocd svc/argocd-server 8888:443 -kubectl port-forward -n argowf svc/argowf-argo-workflows-server 8777:2746 -kubectl port-forward -n gitea svc/gitea-http 8333:3000 +NS=infrastructure +echo "Bearer $(kubectl get -n $NS secret cli.service-account-token -o=jsonpath='{.data.token}' | base64 --decode)" > argowftoken +kubectl get -n $NS secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d > argopw ``` - +Port forward for each service +```cmd +NS=infrastructure +kubectl port-forward -n $NS svc/argocd-server 8888:443 +kubectl port-forward -n $NS svc/argowf-argo-workflows-server 8777:2746 +kubectl port-forward -n $NS svc/gitea-http 8333:3000 +``` diff --git a/charts/.deprecated/argocd/Chart.lock b/charts/.deprecated/argocd/Chart.lock deleted file mode 100644 index ec68be86d0c1d36e7d86e690b03b0fc9d6c7fa5b..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argocd/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: argo-cd - repository: https://argoproj.github.io/argo-helm - version: 6.7.13 -digest: sha256:45d67a5735ca04fba78f8318172391d96e49211c9d66a1e6156ce2b3a8d2689d -generated: "2024-10-14T18:53:36.482654089+03:00" diff --git a/charts/.deprecated/argocd/Chart.yaml b/charts/.deprecated/argocd/Chart.yaml deleted file mode 100644 index b9a1342137dd51e346856c7ce855cdac9213821c..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argocd/Chart.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v2 -name: argo-cd -description: "Wrapper chart for ArgoCD" -version: 1.0.0 - -dependencies: - - name: argo-cd - version: 6.7.13 - repository: https://argoproj.github.io/argo-helm \ No newline at end of file diff --git a/charts/.deprecated/argocd/values.yaml b/charts/.deprecated/argocd/values.yaml deleted file mode 100644 index b8ae62dcb76836a51a1fd976bf47afa10d7f39d5..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argocd/values.yaml +++ /dev/null @@ -1,183 +0,0 @@ -argo-cd: - server: - extraArgs: - - --insecure - service: - type: LoadBalancer - dex: - enabled: false - notifications: - enabled: false - applicationSet: - enabled: false - # Health check for crossplane MRs: - # https://docs.crossplane.io/latest/guides/crossplane-with-argo-cd/#set-health-status - configs: - cm: - timeout.reconciliation: 180s - application.resourceTrackingMethod: annotation - resource.exclusions: | - - apiGroups: - - "*" - kinds: - - ProviderConfigUsage - - XServerInstance - resource.customizations: | - "*.upbound.io/*": - health.lua: | - health_status = { - status = "Progressing", - message = "Provisioning ..." - } - - local function contains (table, val) - for i, v in ipairs(table) do - if v == val then - return true - end - end - return false - end - - local has_no_status = { - "ProviderConfig", - "ProviderConfigUsage" - } - - if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then - health_status.status = "Healthy" - health_status.message = "Resource is up-to-date." - return health_status - end - - if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then - if obj.kind == "ProviderConfig" and obj.status.users ~= nil then - health_status.status = "Healthy" - health_status.message = "Resource is in use." - return health_status - end - return health_status - end - - for i, condition in ipairs(obj.status.conditions) do - if condition.type == "LastAsyncOperation" then - if condition.status == "False" then - health_status.status = "Degraded" - health_status.message = condition.message - return health_status - end - end - - if condition.type == "Synced" then - if condition.status == "False" then - health_status.status = "Degraded" - health_status.message = condition.message - return health_status - end - end - - if condition.type == "Ready" then - if condition.status == "True" then - health_status.status = "Healthy" - health_status.message = "Resource is up-to-date." - return health_status - end - health_status.message = condition.reason - end - end - - return health_status - - "*.crossplane.io/*": - health.lua: | - health_status = { - status = "Progressing", - message = "Provisioning ..." - } - - local function contains (table, val) - for i, v in ipairs(table) do - if v == val then - return true - end - end - return false - end - - local has_no_status = { - "Composition", - "CompositionRevision", - "DeploymentRuntimeConfig", - "ControllerConfig", - "ProviderConfig", - "ProviderConfigUsage" - } - if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then - health_status.status = "Healthy" - health_status.message = "Resource is up-to-date." - return health_status - end - - if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then - if obj.kind == "ProviderConfig" and obj.status.users ~= nil then - health_status.status = "Healthy" - health_status.message = "Resource is in use." - return health_status - end - return health_status - end - - for i, condition in ipairs(obj.status.conditions) do - if condition.type == "LastAsyncOperation" then - if condition.status == "False" then - health_status.status = "Degraded" - health_status.message = condition.message - return health_status - end - end - - if condition.type == "Synced" then - if condition.status == "False" then - health_status.status = "Degraded" - health_status.message = condition.message - return health_status - end - end - - if contains({"Ready", "Healthy", "Offered", "Established"}, condition.type) then - if condition.status == "True" then - health_status.status = "Healthy" - health_status.message = "Resource is up-to-date." - return health_status - end - end - end - - return health_status - - "*.example.org/*": - health.lua: | - health_status = { - status = "Progressing", - message = "Provisioning of resources in progress." - } - - if obj.status == nil or next(obj.status) == nil then - return health_status - end - - for i, condition in ipairs(obj.status.conditions) do - if condition.type == "Ready" then - if condition.status == "True" then - health_status.status = "Healthy" - health_status.message = "Provisioning finalized successfully." - return health_status - end - if condition.message ~= nil then - health_status.message = condition.message - end - return health_status - end - end - - return health_status \ No newline at end of file diff --git a/charts/.deprecated/argoev/Chart.lock b/charts/.deprecated/argoev/Chart.lock deleted file mode 100644 index 4ca54360027abcac39b16b2ddd2b217c974e8fc5..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argoev/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: argo-events - repository: https://argoproj.github.io/argo-helm - version: 2.4.8 -digest: sha256:5ee3f893e89e4a332ecb859998e9c6d48dafe030edf5091dbaadf149e36f7bf3 -generated: "2024-11-05T12:28:15.213620917+02:00" diff --git a/charts/.deprecated/argoev/Chart.yaml b/charts/.deprecated/argoev/Chart.yaml deleted file mode 100644 index 3c12d861a505a7d0b805684a5d3962d01987e879..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argoev/Chart.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v2 -name: argo-events -description: "Wrapper chart for ArgoEvents" -version: 1.0.0 - -dependencies: - - name: argo-events - version: 2.4.8 - repository: https://argoproj.github.io/argo-helm \ No newline at end of file diff --git a/charts/.deprecated/argoev/templates/service-account.yaml b/charts/.deprecated/argoev/templates/service-account.yaml deleted file mode 100644 index 03b045291621980db7360b12a8382133ba9974ed..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argoev/templates/service-account.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.workflowOperatorSA }} - namespace: {{ .Release.Namespace }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.applicationStatusViewerSA }} - namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/charts/.deprecated/argoev/values.yaml b/charts/.deprecated/argoev/values.yaml deleted file mode 100644 index 8849ca30c69753c0d13bb3e43f77a23ee99e7e5f..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argoev/values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -workflowOperatorSA: operate-workflow -applicationStatusViewerSA: claim-application-status \ No newline at end of file diff --git a/charts/.deprecated/argowf/Chart.lock b/charts/.deprecated/argowf/Chart.lock deleted file mode 100644 index 3fcf4e34087a30eff5ba5235987e3e4582845064..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argowf/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: argo-workflows - repository: https://argoproj.github.io/argo-helm - version: 0.42.5 -digest: sha256:4fc5f1ad928c689bd4f59939ef74b1d14ec33d24df180bf2ff69731cc0eb09bc -generated: "2024-11-05T12:28:40.20087529+02:00" diff --git a/charts/.deprecated/argowf/Chart.yaml b/charts/.deprecated/argowf/Chart.yaml deleted file mode 100644 index 144d9ccdbef11eb2580a317c846ebf11da75bb06..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argowf/Chart.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v2 -name: argo-workflows -description: "Wrapper chart for ArgoWorkflows" -version: 1.0.0 - -dependencies: - - name: argo-workflows - version: 0.42.5 - repository: https://argoproj.github.io/argo-helm \ No newline at end of file diff --git a/charts/.deprecated/argowf/templates/rbac.yaml b/charts/.deprecated/argowf/templates/rbac.yaml deleted file mode 100644 index 23c783a37a34ca64587e67c57e7de15ba93db09b..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argowf/templates/rbac.yaml +++ /dev/null @@ -1,180 +0,0 @@ -{{- if .Values.cli.enabled }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: cli - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: cli - namespace: {{ .Release.Namespace }} -rules: - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - update - - apiGroups: - - "" - resources: - - pods - - pods/exec - verbs: - - create - - get - - list - - watch - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - watch - - list - - apiGroups: - - "" - resources: - - persistentvolumeclaims - - persistentvolumeclaims/finalizers - verbs: - - create - - update - - delete - - get - - apiGroups: - - argoproj.io - resources: - - workflows - - workflows/finalizers - - workflowtasksets - - workflowtasksets/finalizers - - workflowartifactgctasks - verbs: - - get - - list - - watch - - update - - patch - - delete - - create - - apiGroups: - - argoproj.io - resources: - - workflowtemplates - - workflowtemplates/finalizers - verbs: - - get - - list - - watch - - apiGroups: - - argoproj.io - resources: - - workflowtaskresults - verbs: - - list - - watch - - deletecollection - - apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - get - - list - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - apiGroups: - - argoproj.io - resources: - - cronworkflows - - cronworkflows/finalizers - verbs: - - get - - list - - watch - - update - - patch - - delete - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - "policy" - resources: - - poddisruptionbudgets - verbs: - - create - - get - - delete ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: cli - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: cli -subjects: -- kind: ServiceAccount - name: cli - namespace: {{ .Release.Namespace }} ---- -apiVersion: v1 -kind: Secret -metadata: - namespace: {{ .Release.Namespace }} - name: cli.service-account-token - annotations: - kubernetes.io/service-account.name: cli -type: kubernetes.io/service-account-token -{{- end }} - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: operate-workflow-role - namespace: {{ .Release.Namespace }} -rules: - - apiGroups: - - argoproj.io - verbs: - - "*" - resources: - - workflows - - workflowtemplates - - cronworkflows - - clusterworkflowtemplates ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: operate-workflow-role-binding - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: operate-workflow-role -subjects: - - kind: ServiceAccount - name: {{ .Values.events.workflowOperatorSA }} - namespace: {{.Values.events.namespace}} diff --git a/charts/.deprecated/argowf/values.yaml b/charts/.deprecated/argowf/values.yaml deleted file mode 100644 index 548e9070c98a1d398be04ee4870a876b48219c81..0000000000000000000000000000000000000000 --- a/charts/.deprecated/argowf/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -events: - workflowOperatorSA: operate-workflow - namespace: argoev -cli: - enabled: true \ No newline at end of file diff --git a/charts/.deprecated/gitea/Chart.lock b/charts/.deprecated/gitea/Chart.lock deleted file mode 100644 index b429f1aba754d85ee06fffa32288c67c12f1609a..0000000000000000000000000000000000000000 --- a/charts/.deprecated/gitea/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: gitea - repository: https://dl.gitea.com/charts - version: 10.4.1 -digest: sha256:4616f419936b982c34ce1fe4fc78e5e9eff0924539d20faf6b0e3d60df40b8fd -generated: "2024-10-14T17:59:08.301980072+03:00" diff --git a/charts/.deprecated/gitea/Chart.yaml b/charts/.deprecated/gitea/Chart.yaml deleted file mode 100644 index 1c881ec757de8781f4c684d079a264a5e1bdd19d..0000000000000000000000000000000000000000 --- a/charts/.deprecated/gitea/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -name: gitea -description: Wrapper helm chart for Gitea - -type: application -version: 1.0.0 - -dependencies: - - name: gitea - repository: https://dl.gitea.com/charts - version: 10.4.1 \ No newline at end of file diff --git a/charts/.deprecated/gitea/templates/pvc.yaml b/charts/.deprecated/gitea/templates/pvc.yaml deleted file mode 100644 index 50014ef6914aad419603f018768f0ef4cbdbcc44..0000000000000000000000000000000000000000 --- a/charts/.deprecated/gitea/templates/pvc.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: gitea-pvc -spec: - storageClassName: {{ .Values.gitea.storageClassName }} - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.gitea.volumeSize }} \ No newline at end of file diff --git a/charts/.deprecated/gitea/values.yaml b/charts/.deprecated/gitea/values.yaml deleted file mode 100644 index bbe0eaca665c02447601296f7291fdfda6d992d1..0000000000000000000000000000000000000000 --- a/charts/.deprecated/gitea/values.yaml +++ /dev/null @@ -1,38 +0,0 @@ - -gitea: - storageClassName: ionos-enterprise-ssd - volumeSize: 100G - service: - http: - type: LoadBalancer - redis-cluster: - enabled: false - redis: - enabled: false - postgresql: - enabled: false - postgresql-ha: - enabled: false - persistence: - enabled: true - mount: true - create: false - claimName: gitea-pvc - gitea: - config: - APP_NAME: "Provisioner GIT Server" - repository: - ENABLE_PUSH_CREATE_USER: true - DEFAULT_PUSH_CREATE_PRIVATE: false - database: - DB_TYPE: sqlite3 - session: - PROVIDER: memory - cache: - ADAPTER: db - queue: - TYPE: level - admin: - username: "gitops_test" - password: "test1234" - email: "test@gitops.email.com" \ No newline at end of file diff --git a/charts/dependencies/values.yaml b/charts/dependencies/values.yaml index a378022a42aad8dcaf9cbf440fe60894049b94b3..b4c2a9981851953b5d6d4c921fc993df774ee3cc 100644 --- a/charts/dependencies/values.yaml +++ b/charts/dependencies/values.yaml @@ -6,8 +6,8 @@ crossplane: - code.europa.eu:4567/simpl/simpl-open/development/infrastructure/infrastructure-crossplane/configuration:v0.3.5 gitea: - storageClassName: standard - # storageClassName: csi-cinder-high-speed + # storageClassName: standard + storageClassName: csi-cinder-high-speed volumeSize: 100G service: http: diff --git a/charts/resources/templates/events/decommission/source.yaml b/charts/resources/templates/events/decommission/source.yaml index b6c17e8c6d866153c2469131ad128a7cbae61fba..d3b34ea7fbefdc444f20e4a227e9b904e875a090 100644 --- a/charts/resources/templates/events/decommission/source.yaml +++ b/charts/resources/templates/events/decommission/source.yaml @@ -7,7 +7,7 @@ spec: eventBusName: provisioner-eventbus kafka: decommissionRequest: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: to-decommission jsonBody: false partition: "0" diff --git a/charts/resources/templates/events/decommission/status-sensor.yaml b/charts/resources/templates/events/decommission/status-sensor.yaml index 0721f5dc3feed8d8e9dc6990d983c33306e9e31c..d999f5144d3a03a0cde5437690626fbe5a8dd3c7 100644 --- a/charts/resources/templates/events/decommission/status-sensor.yaml +++ b/charts/resources/templates/events/decommission/status-sensor.yaml @@ -13,7 +13,7 @@ spec: - template: name: kafka kafka: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: decommissioned payload: - src: diff --git a/charts/resources/templates/events/provision/gitops-status-sensor.yaml b/charts/resources/templates/events/provision/gitops-status-sensor.yaml index 10d01821502a1488fe50bdc557b870d8c788b0ad..919462c7c67d802d5a2cf303d1ddbbd27d876371 100644 --- a/charts/resources/templates/events/provision/gitops-status-sensor.yaml +++ b/charts/resources/templates/events/provision/gitops-status-sensor.yaml @@ -13,7 +13,7 @@ spec: - template: name: kafka kafka: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: provisioned partition: 0 payload: diff --git a/charts/resources/templates/events/provision/source.yaml b/charts/resources/templates/events/provision/source.yaml index 37226ecae7039bc444d694b3c1bb6274d713f844..a389c324eb4a1b4d68b503d7eb774ad8ac56879f 100644 --- a/charts/resources/templates/events/provision/source.yaml +++ b/charts/resources/templates/events/provision/source.yaml @@ -7,7 +7,7 @@ spec: eventBusName: provisioner-eventbus kafka: provisionRequest: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: to-provision jsonBody: false partition: "0" diff --git a/charts/resources/templates/events/provision/status-sensor.yaml b/charts/resources/templates/events/provision/status-sensor.yaml index 04e31577ebcb2fbceda1f66bbc4f56f9f60d83d3..47935b53527c140cfc5733d73ca30b19c3fc90b1 100644 --- a/charts/resources/templates/events/provision/status-sensor.yaml +++ b/charts/resources/templates/events/provision/status-sensor.yaml @@ -167,7 +167,7 @@ spec: image: confluentinc/cp-kafkacat:7.1.14 command: [sh] source: | - echo {{`{{inputs.parameters.payload}}`}} | kafkacat -P -b kafka:9092 -t provisioned -J + echo {{`{{inputs.parameters.payload}}`}} | kafkacat -P -b {{ .Values.kafkaEndpoint }} -t provisioned -J parameters: - src: dependencyName: message diff --git a/charts/resources/values.yaml b/charts/resources/values.yaml index 8ee2f1acd2e3d29e4689ad9a152e31fe4005e411..56d85d04e01329e733f7596242c28712da953c21 100644 --- a/charts/resources/values.yaml +++ b/charts/resources/values.yaml @@ -1,4 +1,6 @@ workflowOperatorSA: operate-workflow applicationStatusViewerSA: claim-application-status cliEnabled: true -dependenciesReleaseName: provisioner-dependencies \ No newline at end of file +dependenciesReleaseName: provisioner-dependencies +# kafkaEndpoint: kafka:9092 +kafkaEndpoint: kafka.infrastructure.dev.simpl-europe.eu:9092 \ No newline at end of file diff --git a/k8s/events/decommission/source.yaml b/k8s/events/decommission/source.yaml index b7eba075f4a6479898416be492aaafaa096088ea..4dcd5cd5ef26ec4195d4987669f57903987e3899 100644 --- a/k8s/events/decommission/source.yaml +++ b/k8s/events/decommission/source.yaml @@ -7,7 +7,7 @@ spec: eventBusName: provisioner kafka: decommissionRequest: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: to-decommission jsonBody: false partition: "0" diff --git a/k8s/events/decommission/status-emitter.yaml b/k8s/events/decommission/status-emitter.yaml index c1ef16955a97b147be6718d4aea1e9c94077be6b..7ab6b17737ffa2292f17d88d97fea2ea899bb605 100644 --- a/k8s/events/decommission/status-emitter.yaml +++ b/k8s/events/decommission/status-emitter.yaml @@ -13,7 +13,7 @@ spec: - template: name: kafka kafka: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: decommissioned payload: - src: diff --git a/k8s/events/provision/source.yaml b/k8s/events/provision/source.yaml index 65f945b952cc545a82bbd3c066a35bcd008cfb18..26ea9cbc3567be863e33a06a5246ec7b76aee4e4 100644 --- a/k8s/events/provision/source.yaml +++ b/k8s/events/provision/source.yaml @@ -7,7 +7,7 @@ spec: eventBusName: provisioner kafka: provisionRequest: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: to-provision jsonBody: false partition: "0" diff --git a/k8s/events/provision/status-emitter.yaml b/k8s/events/provision/status-emitter.yaml index b3fa988e8518e790ef94a359e99a05ccff776561..65fd351f3d1c7618a83250ddb8e5e1f097077d6f 100644 --- a/k8s/events/provision/status-emitter.yaml +++ b/k8s/events/provision/status-emitter.yaml @@ -13,7 +13,7 @@ spec: - template: name: kafka kafka: - url: kafka:9092 + url: {{ .Values.kafkaEndpoint }} topic: provisioned partition: 0 payload: diff --git a/k8s/events/provision/workflow-status-sensor.yaml b/k8s/events/provision/workflow-status-sensor.yaml index beea92fb245aae8edf9ca2c08bf50b40478d2b9a..75b9b988f4ccf69116958925422018af762f2587 100644 --- a/k8s/events/provision/workflow-status-sensor.yaml +++ b/k8s/events/provision/workflow-status-sensor.yaml @@ -164,7 +164,7 @@ spec: image: confluentinc/cp-kafkacat:7.1.14 command: [sh] source: | - echo {{inputs.parameters.payload}} | kafkacat -P -b kafka:9092 -t provisioned -J + echo {{inputs.parameters.payload}} | kafkacat -P -b {{ .Values.kafkaEndpoint }} -t provisioned -J parameters: - src: dependencyName: message