diff --git a/.gitignore b/.gitignore index c2608b6..de170c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# + # Binaries for programs and plugins *.exe *.exe~ @@ -20,3 +18,11 @@ # Go workspace file go.work .DS_Store + +bin + +# editor and IDE paraphernalia +.idea +*.swp +*.swo +*~ \ No newline at end of file diff --git a/Makefile b/Makefile index ec6e8d8..8aa72f9 100644 --- a/Makefile +++ b/Makefile @@ -27,9 +27,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images. # This variable is used to construct full image tags for bundle and catalog images. # -# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both -# parodos.dev/operator-bundle:$VERSION and parodos.dev/operator-catalog:$VERSION. -IMAGE_TAG_BASE ?= quay.io/parodos-dev/orchestrator-controller +IMAGE_TAG_BASE ?= quay.io/orchestrator/controller-manager # BUNDLE_IMG defines the image:tag used for the bundle. # You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) @@ -48,7 +46,7 @@ endif # Set the Operator SDK version to use. By default, what is installed on the system is used. # This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. -OPERATOR_SDK_VERSION ?= v1.34.1 +OPERATOR_SDK_VERSION ?= v1.33.0 # Image URL to use all building/pushing image targets IMG ?= $(IMAGE_TAG_BASE):latest @@ -95,11 +93,14 @@ docker-push: ## Push docker image with the manager. # To properly provided solutions that supports more than one platform you should use this option. PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le .PHONY: docker-buildx -docker-buildx: ## Build and push docker image for the manager for cross-platform support +docker-buildx: test ## Build and push docker image for the manager for cross-platform support + # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile + sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - docker buildx create --name project-v3-builder docker buildx use project-v3-builder - - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile . + - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - docker buildx rm project-v3-builder + rm Dockerfile.cross ##@ Deployment @@ -131,7 +132,7 @@ ifeq (,$(shell which kustomize 2>/dev/null)) @{ \ set -e ;\ mkdir -p $(dir $(KUSTOMIZE)) ;\ - curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.2.1/kustomize_v5.2.1_$(OS)_$(ARCH).tar.gz | \ + curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.0.1/kustomize_v5.0.1_$(OS)_$(ARCH).tar.gz | \ tar xzf - -C bin/ ;\ } else @@ -147,7 +148,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null)) @{ \ set -e ;\ mkdir -p $(dir $(HELM_OPERATOR)) ;\ - curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.34.1/helm-operator_$(OS)_$(ARCH) ;\ + curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.33.0/helm-operator_$(OS)_$(ARCH) ;\ chmod +x $(HELM_OPERATOR) ;\ } else @@ -156,7 +157,7 @@ endif endif .PHONY: operator-sdk -OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk +OPERATOR_SDK ?= ./bin/operator-sdk operator-sdk: ## Download operator-sdk locally if necessary. ifeq (,$(wildcard $(OPERATOR_SDK))) ifeq (, $(shell which operator-sdk 2>/dev/null)) @@ -187,7 +188,7 @@ bundle-push: ## Push the bundle image. $(MAKE) docker-push IMG=$(BUNDLE_IMG) .PHONY: opm -OPM = $(LOCALBIN)/opm +OPM = ./bin/opm opm: ## Download opm locally if necessary. ifeq (,$(wildcard $(OPM))) ifeq (,$(shell which opm 2>/dev/null)) diff --git a/PROJECT b/PROJECT index 9b67d7a..48ab176 100644 --- a/PROJECT +++ b/PROJECT @@ -8,7 +8,7 @@ layout: plugins: manifests.sdk.operatorframework.io/v2: {} scorecard.sdk.operatorframework.io/v2: {} -projectName: operator +projectName: orchestrator-operator resources: - api: crdVersion: v1 @@ -17,4 +17,4 @@ resources: group: orchestrator kind: Orchestrator version: v1alpha1 -version: "3" +version: "1" diff --git a/bin/kustomize b/bin/kustomize deleted file mode 100755 index 5a8f42c..0000000 Binary files a/bin/kustomize and /dev/null differ diff --git a/bundle.Dockerfile b/bundle.Dockerfile index a462f58..08646b1 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -4,9 +4,9 @@ FROM scratch LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=parodos-orchestrator-operator +LABEL operators.operatorframework.io.bundle.package.v1=orchestrator-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1 diff --git a/bundle/manifests/orchestrator-controller-manager-metrics-service_v1_service.yaml b/bundle/manifests/orchestrator-operator-controller-manager-metrics-service_v1_service.yaml similarity index 73% rename from bundle/manifests/orchestrator-controller-manager-metrics-service_v1_service.yaml rename to bundle/manifests/orchestrator-operator-controller-manager-metrics-service_v1_service.yaml index 3a8de0b..1c55a0f 100644 --- a/bundle/manifests/orchestrator-controller-manager-metrics-service_v1_service.yaml +++ b/bundle/manifests/orchestrator-operator-controller-manager-metrics-service_v1_service.yaml @@ -4,13 +4,13 @@ metadata: creationTimestamp: null labels: app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: operator + app.kubernetes.io/created-by: orchestrator-operator app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: service - app.kubernetes.io/part-of: operator + app.kubernetes.io/part-of: orchestrator-operator control-plane: controller-manager - name: orchestrator-controller-manager-metrics-service + name: orchestrator-operator-controller-manager-metrics-service spec: ports: - name: https diff --git a/bundle/manifests/orchestrator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/manifests/orchestrator-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml similarity index 68% rename from bundle/manifests/orchestrator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml rename to bundle/manifests/orchestrator-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml index 476a7b2..4800175 100644 --- a/bundle/manifests/orchestrator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/bundle/manifests/orchestrator-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -4,12 +4,12 @@ metadata: creationTimestamp: null labels: app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: operator + app.kubernetes.io/created-by: orchestrator-operator app.kubernetes.io/instance: metrics-reader app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: operator - name: orchestrator-metrics-reader + app.kubernetes.io/part-of: orchestrator-operator + name: orchestrator-operator-metrics-reader rules: - nonResourceURLs: - /metrics diff --git a/bundle/manifests/operator.clusterserviceversion.yaml b/bundle/manifests/orchestrator-operator.clusterserviceversion.yaml similarity index 60% rename from bundle/manifests/operator.clusterserviceversion.yaml rename to bundle/manifests/orchestrator-operator.clusterserviceversion.yaml index d5fcaa6..216622d 100644 --- a/bundle/manifests/operator.clusterserviceversion.yaml +++ b/bundle/manifests/orchestrator-operator.clusterserviceversion.yaml @@ -11,16 +11,17 @@ metadata: "name": "orchestrator-sample" }, "spec": { + "argocd": { + "enabled": false, + "namespace": "orchestrator-gitops", + "password": "", + "url": "", + "username": "admin" + }, "orchestrator": { "devmode": false, "namespace": "sonataflow-infra", "sonataPlatform": { - "dataIndex": { - "image": "quay.io/kiegroup/kogito-data-index-postgresql-nightly:latest" - }, - "jobService": { - "image": "quay.io/kiegroup/kogito-jobs-service-postgresql-nightly:latest" - }, "resources": { "limits": { "cpu": "500m", @@ -31,13 +32,7 @@ metadata: "memory": "64Mi" } } - }, - "sonataflows": [ - { - "image": "quay.io/orchestrator/serverless-workflow-greeting:latest", - "name": "greeting" - } - ] + } }, "postgres": { "authSecret": { @@ -61,13 +56,10 @@ metadata: "clusterUrl": "" }, "subscription": { - "channel": "alpha", + "channel": "fast", "installPlanApproval": "Automatic", - "namespace": "backstage-system", - "pkgName": "backstage-operator", - "source": "rhdh-operator", - "sourceImage": "quay.io/janus-idp/operator-catalog:0.1.0", - "sourceNamespace": "openshift-marketplace" + "name": "rhdh", + "namespace": "rhdh-operator" } }, "serverlessOperator": { @@ -75,9 +67,8 @@ metadata: "subscription": { "channel": "stable", "installPlanApproval": "Automatic", - "namespace": "openshift-serverless", - "pkgName": "serverless-operator", - "sourceNamespace": "openshift-marketplace" + "name": "serverless-operator", + "namespace": "openshift-serverless" } }, "sonataFlowOperator": { @@ -85,21 +76,21 @@ metadata: "subscription": { "channel": "alpha", "installPlanApproval": "Automatic", - "namespace": "openshift-operators", - "pkgName": "sonataflow-operator", - "source": "sonataflow-operator", - "sourceImage": "quay.io/masayag/kogito-serverless-operator-catalog:v999.0.0-snapshot", - "sourceNamespace": "openshift-marketplace" + "name": "logic-operator-rhel8", + "namespace": "openshift-serverless-logic" } + }, + "tekton": { + "enabled": false } } } ] capabilities: Basic Install - createdAt: "2024-03-27T21:42:46Z" - operators.operatorframework.io/builder: operator-sdk-v1.34.1 + createdAt: "2024-03-28T20:50:26Z" + operators.operatorframework.io/builder: operator-sdk-v1.33.0 operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1 - name: parodos-orchestrator-operator.v0.0.1 + name: orchestrator-operator.v0.0.1 namespace: openshift-operators spec: minKubeVersion: 1.27.0 @@ -108,13 +99,12 @@ spec: owned: - kind: Orchestrator name: orchestrators.orchestrator.parodos.dev - description: Parodos Orchestrator Operator version: v1alpha1 - description: Parodos Orchestrator - displayName: Parodos Orchestrator + description: Orchestrator helm based operator + displayName: Orchestrator Operator icon: - - base64data: "iVBORw0KGgoAAAANSUhEUgAAAJMAAACTCAYAAACK5SsVAAAJ1UlEQVR4nOzde2xW5R0H8O9zbu/70kIptIWquAKisA5QEebKZdNsLjqy6G5x2SAmcyGbDMwuLjgyp3H7S7eIy9yYk+HGDGa6zTET3Fy80nFTGXihlAIqRSj0RqXv5ZzzLH07u1J6zvuWPn0u3e+TkKDPad9vzNdze895HgcF8HVIYHz5JNhhwW3J/4HA8tHedpytQmbgEBtse76hJhk6nd8E+HIOzJUSkhiFAXvA2UarvfUXHxTrnDLxTWXT/ND6KwM+rCQlMQoD9lk8/Cxb3nHorDLxjWMnBpazA8A0dfGIgRptK1xg9f83ge3cS0Ui5+GSILTu6dsz8ccrS4OM3wIgqTYXMVSmb8/kZ4M6KhIZhkRfmRgPL1SbhZjuf2UC89RGIaazVAcgoweViQhDZSLCUJmIMFQmIgyViQhDZSLCUJmIMFQmIgyViQhDZSLCUJmIMNq8JJCbcweC8tmqYxTH7wTzu3v/5E4DmRZYnU1gpw/Dev9dgAeqEyqhTZmC8loEk+tUxxi+IAOrbR+c4/WwWrbDPrkLCLKqU0mhTZlGDTuBsGIeshXzAKzMF8lpfhbO4T/BPvY8wH3VCUcMlWmk2R78Kdfn/7DuFrhNj8E58ChYpk11MuHoBFwinqpEtnYVupe+gOzcNeCpCtWRhKIyKcCdMcjNvBXdNzyPXO2q/KFxNKAyKcSdJLIfWY3u655CUHW16jjD1veqU/C78hUc+KWqID3/t8JyVX380DAb3CkF3FLAG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0uNS02LjQuMy05LjEsMi4yLTIuNiwxLjktNC40LDQuNy00LjksNy45LTEsNi42LDMuNSwxMi45LDEwLjEsMTMuOWguMVoiLz4KICAgICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNODQuNjEsMzMuNDVzMC0uMS0uMS0uMkw0OS4zMS4xNWMtLjItLjItLjYtLjItLjksMC0uMi4yLS4yLjYsMCwuOWwzMS43LDM1LjNoMHMxLjEuOCwyLjQuOC44LDAsMS4yLS4zYy41LS4yLjktLjYsMS0xLjEuNC0xLjEtLjItMi4zLS4zLTIuNGgwbC4yLjFaIi8+CiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTcxLjQxLDM0Ljc1YzAtLjItLjMtLjQtLjYtLjRoMGMtLjIsMC0uNS4yLS42LjQtMS40LDMuNC00LjksMTAuMy0xMi4yLDE4LjQtNCw0LjQtMTMuNSwxNC44LTM0LjIsMTIuNEMzLjkxLDYzLjI1LDMuMjEsMzguNjUsMy4yMSwzOC40NWMwLS4zLS4yLS42LS41LS42cy0uNi4yLS43LjRjLS4xLjUtMy44LDEzLjQtLjksMjQuMSwxLjEsNC4yLDQuNiwxMCwxMC45LDE0LjFsLTIuOCwyLjRjLS4yLjItLjMuNS0uMi43czIuOSw2LDE5LjQsMTIuM2MxMS41LDQuNCwxOC43LDUuNiwyMyw1LjZzNS41LTEsNS43LTEuMS4zLS40LjMtLjYtLjItLjQtLjUtLjVjMCwwLS4yLDAtLjUtLjItMi43LS44LTEyLjItNC4xLTIxLjItMTIuOC0uNi0uNi0xLjItMS4yLTEuOC0xLjgsMTIuOC0yLjgsMjQuNC0xNC4yLDMxLjEtMjQuMSw1LjMtNy44LDcuMi0xNC45LDcuOC0xOS41di0uM2wtLjgtMS45aDBsLS4xLjFaIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4=" + mediatype: "image/svg+xml" install: spec: clusterPermissions: @@ -123,15 +113,6 @@ spec: - "" resources: - namespaces - verbs: - - get - - list - - watch - - patch - - update - - apiGroups: - - "" - resources: - secrets verbs: - '*' @@ -223,13 +204,6 @@ spec: - delete - watch - patch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - create - - delete - apiGroups: - apps.openshift.io resources: @@ -343,53 +317,37 @@ spec: - subjectaccessreviews verbs: - create - serviceAccountName: parodos-orchestrator-operator + serviceAccountName: orchestrator-operator-controller-manager deployments: - label: app.kubernetes.io/component: manager - app.kubernetes.io/created-by: operator + app.kubernetes.io/created-by: orchestrator-operator app.kubernetes.io/instance: controller-manager app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: deployment - app.kubernetes.io/part-of: operator - operator.parodos.dev/name: orchestrator - name: parodos-orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator + control-plane: controller-manager + name: orchestrator-operator-controller-manager spec: replicas: 1 selector: matchLabels: - operator.parodos.dev/name: orchestrator + control-plane: controller-manager strategy: {} template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - operator.parodos.dev/name: orchestrator + control-plane: controller-manager spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux containers: - args: - --secure-listen-address=0.0.0.0:8443 - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1 name: kube-rbac-proxy ports: - containerPort: 8443 @@ -411,8 +369,8 @@ spec: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 - --leader-elect - - --leader-election-id=operator - image: quay.io/jordigilh/orchestrator-controller:latest + - --leader-election-id=orchestrator-operator + image: quay.io/orchestrator/controller-manager:latest livenessProbe: httpGet: path: /healthz @@ -440,7 +398,7 @@ spec: - ALL securityContext: runAsNonRoot: true - serviceAccountName: parodos-orchestrator-operator + serviceAccountName: orchestrator-operator terminationGracePeriodSeconds: 10 permissions: - rules: @@ -475,7 +433,7 @@ spec: verbs: - create - patch - serviceAccountName: parodos-orchestrator-operator + serviceAccountName: orchestrator-operator strategy: deployment installModes: - supported: false @@ -487,10 +445,9 @@ spec: - supported: true type: AllNamespaces keywords: - - parodos - orchestrator links: - - name: Operator + - name: Orchestrator Operator url: https://github.com/parodos-dev/orchestrator-helm-operator maturity: alpha provider: diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 34b2774..05efe73 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -3,9 +3,9 @@ annotations: operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: parodos-orchestrator-operator + operators.operatorframework.io.bundle.package.v1: orchestrator-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.34.1 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.33.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1 diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml index 74037b4..d5b4b3e 100644 --- a/bundle/tests/scorecard/config.yaml +++ b/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-crds-have-resources-test @@ -48,7 +48,7 @@ stages: - entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-spec-descriptors-test @@ -58,7 +58,7 @@ stages: - entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 40a494f..64b260a 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: orchestrator-system +namespace: orchestrator-operator-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: parodos-orchestrator- +namePrefix: orchestrator-operator- # Labels to add to all resources and selectors. #labels: diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index c759e8f..011d6cd 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -3,27 +3,11 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: operator + name: controller-manager namespace: system spec: template: spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux containers: - name: kube-rbac-proxy securityContext: @@ -31,7 +15,7 @@ spec: capabilities: drop: - "ALL" - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" @@ -53,4 +37,4 @@ spec: - "--health-probe-bind-address=:8081" - "--metrics-bind-address=127.0.0.1:8080" - "--leader-elect" - - "--leader-election-id=operator" + - "--leader-election-id=orchestrator-operator" diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index d4dcd7b..6910d29 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/parodos-dev/orchestrator-controller + newName: quay.io/orchestrator/controller-manager newTag: latest diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index bd97bb9..0f0b817 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: namespace app.kubernetes.io/instance: system app.kubernetes.io/component: manager - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: system --- @@ -21,8 +21,8 @@ metadata: app.kubernetes.io/name: deployment app.kubernetes.io/instance: controller-manager app.kubernetes.io/component: manager - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize spec: selector: @@ -68,7 +68,7 @@ spec: containers: - args: - --leader-elect - - --leader-election-id=operator + - --leader-election-id=orchestrator-operator image: controller:latest name: manager securityContext: diff --git a/config/manifests/bases/orchestrator-operator.clusterserviceversion.yaml b/config/manifests/bases/orchestrator-operator.clusterserviceversion.yaml new file mode 100644 index 0000000..88f0432 --- /dev/null +++ b/config/manifests/bases/orchestrator-operator.clusterserviceversion.yaml @@ -0,0 +1,39 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[]' + capabilities: Basic Install + name: orchestrator-operator.v0.0.0 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: {} + description: Orchestrator helm based operator + displayName: Orchestrator Operator + icon: + - base64data: "" + mediatype: "" + install: + spec: + deployments: null + strategy: "" + installModes: + - supported: false + type: OwnNamespace + - supported: false + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - orchestrator + links: + - name: Orchestrator Operator + url: https://orchestrator-operator.domain + maturity: alpha + provider: + name: Red Hat + url: https://parodos.dev + version: 0.0.1 diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 3760c94..3948770 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -1,7 +1,7 @@ # These resources constitute the fully configured set of manifests # used to generate the 'manifests/' directory in a bundle. resources: -- bases/operator.clusterserviceversion.yaml +- bases/orchestrator-operator.clusterserviceversion.yaml - ../default - ../samples - ../scorecard diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index 482df01..041c614 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -5,11 +5,11 @@ kind: ServiceMonitor metadata: labels: control-plane: controller-manager - app.kubernets.io/name: servicemonitor + app.kubernetes.io/name: servicemonitor app.kubernetes.io/instance: controller-manager-metrics-monitor app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml index 8f6e4d1..9d29416 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: metrics-reader app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: metrics-reader rules: diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml index c48234e..6413029 100644 --- a/config/rbac/auth_proxy_role.yaml +++ b/config/rbac/auth_proxy_role.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: proxy-role app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: proxy-role rules: diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml index 8cb153a..605450d 100644 --- a/config/rbac/auth_proxy_role_binding.yaml +++ b/config/rbac/auth_proxy_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: proxy-rolebinding app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: proxy-rolebinding roleRef: diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 8fa979b..28b94d6 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: service app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index 19d64d3..7cedb1b 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -6,9 +6,9 @@ metadata: app.kubernetes.io/name: role app.kubernetes.io/instance: leader-election-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator - app.kubernets.io/managed-by: kustomize + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator + app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: - apiGroups: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index f07fa72..e493027 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: rolebinding app.kubernetes.io/instance: leader-election-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/config/rbac/orchestrator_editor_role.yaml b/config/rbac/orchestrator_editor_role.yaml index a5d6a52..9447b53 100644 --- a/config/rbac/orchestrator_editor_role.yaml +++ b/config/rbac/orchestrator_editor_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: orchestrator-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: orchestrator-editor-role rules: diff --git a/config/rbac/orchestrator_viewer_role.yaml b/config/rbac/orchestrator_viewer_role.yaml index 613a0bf..6d55822 100644 --- a/config/rbac/orchestrator_viewer_role.yaml +++ b/config/rbac/orchestrator_viewer_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: orchestrator-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: orchestrator-viewer-role rules: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8c4920c..592d572 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -7,20 +7,11 @@ rules: ## Base operator rules ## # We need to get namespaces so the operator can read namespaces to ensure they exist -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - patch - - update # We need to manage Helm release secrets - apiGroups: - "" resources: + - namespaces - secrets verbs: - "*" @@ -113,13 +104,6 @@ rules: - delete - watch - patch -- apiGroups: - - "" - resources: - - namespaces - verbs: - - create - - delete - apiGroups: - apps.openshift.io resources: diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index b8b41d6..4e2b336 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: manager-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index 00526cc..7f5a7aa 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: serviceaccount app.kubernetes.io/instance: controller-manager-sa app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: operator - app.kubernetes.io/part-of: operator + app.kubernetes.io/created-by: orchestrator-operator + app.kubernetes.io/part-of: orchestrator-operator app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/samples/orchestrator_v1alpha1_orchestrator.yaml b/config/samples/orchestrator_v1alpha1_orchestrator.yaml index fd3a73c..61b583e 100644 --- a/config/samples/orchestrator_v1alpha1_orchestrator.yaml +++ b/config/samples/orchestrator_v1alpha1_orchestrator.yaml @@ -4,14 +4,16 @@ metadata: name: orchestrator-sample spec: # Default values copied from /helm-charts/orchestrator/values.yaml + argocd: + enabled: false + namespace: orchestrator-gitops + password: "" + url: "" + username: admin orchestrator: devmode: false namespace: sonataflow-infra sonataPlatform: - dataIndex: - image: quay.io/kiegroup/kogito-data-index-postgresql-nightly:latest - jobService: - image: quay.io/kiegroup/kogito-jobs-service-postgresql-nightly:latest resources: limits: cpu: 500m @@ -19,9 +21,6 @@ spec: requests: cpu: 250m memory: 64Mi - sonataflows: - - image: quay.io/orchestrator/serverless-workflow-greeting:latest - name: greeting postgres: authSecret: name: sonataflow-psql-postgresql @@ -40,30 +39,25 @@ spec: clusterToken: "" clusterUrl: "" subscription: - channel: alpha + channel: fast installPlanApproval: Automatic - namespace: backstage-system - pkgName: backstage-operator - source: rhdh-operator - sourceImage: quay.io/janus-idp/operator-catalog:0.1.0 - sourceNamespace: openshift-marketplace + name: rhdh + namespace: rhdh-operator serverlessOperator: enabled: true subscription: channel: stable installPlanApproval: Automatic + name: serverless-operator namespace: openshift-serverless - pkgName: serverless-operator - sourceNamespace: openshift-marketplace sonataFlowOperator: enabled: true subscription: channel: alpha installPlanApproval: Automatic - namespace: openshift-operators - pkgName: sonataflow-operator - source: sonataflow-operator - sourceImage: quay.io/masayag/kogito-serverless-operator-catalog:v999.0.0-snapshot - sourceNamespace: openshift-marketplace + name: logic-operator-rhel8 + namespace: openshift-serverless-logic + tekton: + enabled: false diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml index 7d72d8e..a2f1589 100644 --- a/config/scorecard/patches/basic.config.yaml +++ b/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: basic test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml index 8cfd81c..9b7ca41 100644 --- a/config/scorecard/patches/olm.config.yaml +++ b/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-crds-have-resources-test @@ -34,7 +34,7 @@ entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-spec-descriptors-test @@ -44,7 +44,7 @@ entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.25.0 + image: quay.io/operator-framework/scorecard-test:v1.33.0 labels: suite: olm test: olm-status-descriptors-test