From b4878ff752a5cf5bb5d5eb7d9a3198cb84123c61 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 20 Feb 2026 17:57:06 +0600 Subject: [PATCH] Fix version detection for openshift deployment Signed-off-by: Tamal Saha --- .../capi-core/cluster-presets.yaml | 6 - .../ocm-hub/cluster-auth-manager.yaml | 6 - .../ocm-hub/cluster-gateway-manager.yaml | 6 - .../ocm-hub/cluster-manager-hub.yaml | 6 - .../ocm-hub/cluster-profile-manager.yaml | 5 - .../ocm-hub/cluster-proxy-manager.yaml | 6 - .../featuresets/ocm-hub/fluxcd-manager.yaml | 6 - .../ocm-hub/hub-cluster-robot.yaml | 6 - .../ocm-hub/license-proxyserver-manager.yaml | 5 - .../managed-serviceaccount-manager.yaml | 6 - .../ocm-spoke/cluster-manager-spoke.yaml | 6 - .../kubedb-ui-presets.yaml | 6 - .../opscenter-networking/voyager-gateway.yaml | 10 +- .../opentelemetry/appscode-otel-stack.yaml | 214 ------------------ .../cert-manager/cert-manager.yaml | 12 +- features.md | 3 - go.mod | 2 +- go.sum | 4 +- vendor/filippo.io/edwards25519/extra.go | 1 + vendor/modules.txt | 2 +- 20 files changed, 15 insertions(+), 303 deletions(-) delete mode 100644 charts/opscenter-features/templates/featuresets/opscenter-observability/opentelemetry/appscode-otel-stack.yaml diff --git a/charts/opscenter-features/templates/featuresets/capi-core/cluster-presets.yaml b/charts/opscenter-features/templates/featuresets/capi-core/cluster-presets.yaml index e0f7d5a99..56b2aa385 100644 --- a/charts/opscenter-features/templates/featuresets/capi-core/cluster-presets.yaml +++ b/charts/opscenter-features/templates/featuresets/capi-core/cluster-presets.yaml @@ -35,12 +35,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-presets.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-auth-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-auth-manager.yaml index de79a3d82..49d85f296 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-auth-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-auth-manager.yaml @@ -51,12 +51,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-auth-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-gateway-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-gateway-manager.yaml index fe525669b..4679d4c29 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-gateway-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-gateway-manager.yaml @@ -54,12 +54,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-gateway-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-manager-hub.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-manager-hub.yaml index db4d25d19..938a61acd 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-manager-hub.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-manager-hub.yaml @@ -40,12 +40,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-manager-hub.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-profile-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-profile-manager.yaml index 77ce07b02..5c5c49203 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-profile-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-profile-manager.yaml @@ -58,11 +58,6 @@ spec: name: ace-features-cred valuesKey: cluster-profile-manager.yaml optional: true - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-profile-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-proxy-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-proxy-manager.yaml index 34a3dc1be..6cf97d1c7 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-proxy-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/cluster-proxy-manager.yaml @@ -53,12 +53,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-proxy-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/fluxcd-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/fluxcd-manager.yaml index faf95b1e9..6dace0eda 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/fluxcd-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/fluxcd-manager.yaml @@ -71,12 +71,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: fluxcd-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/hub-cluster-robot.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/hub-cluster-robot.yaml index 382da9a5a..bb2e744b6 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/hub-cluster-robot.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/hub-cluster-robot.yaml @@ -37,12 +37,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: hub-cluster-robot.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/license-proxyserver-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/license-proxyserver-manager.yaml index 95ebc044c..77b4d35a5 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/license-proxyserver-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/license-proxyserver-manager.yaml @@ -56,11 +56,6 @@ spec: name: ace-licenseserver-cred valuesKey: license-proxyserver-manager.yaml optional: true - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: license-proxyserver-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-hub/managed-serviceaccount-manager.yaml b/charts/opscenter-features/templates/featuresets/ocm-hub/managed-serviceaccount-manager.yaml index f0885aaef..1170094e8 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-hub/managed-serviceaccount-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-hub/managed-serviceaccount-manager.yaml @@ -48,12 +48,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: managed-serviceaccount-manager.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/ocm-spoke/cluster-manager-spoke.yaml b/charts/opscenter-features/templates/featuresets/ocm-spoke/cluster-manager-spoke.yaml index 334ccd030..97212795c 100644 --- a/charts/opscenter-features/templates/featuresets/ocm-spoke/cluster-manager-spoke.yaml +++ b/charts/opscenter-features/templates/featuresets/ocm-spoke/cluster-manager-spoke.yaml @@ -39,12 +39,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: cluster-manager-spoke.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/opscenter-datastore/kubedb-ui-presets.yaml b/charts/opscenter-features/templates/featuresets/opscenter-datastore/kubedb-ui-presets.yaml index 13813c331..a701cf2fd 100644 --- a/charts/opscenter-features/templates/featuresets/opscenter-datastore/kubedb-ui-presets.yaml +++ b/charts/opscenter-features/templates/featuresets/opscenter-datastore/kubedb-ui-presets.yaml @@ -28,12 +28,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: kubedb-ui-presets.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/opscenter-networking/voyager-gateway.yaml b/charts/opscenter-features/templates/featuresets/opscenter-networking/voyager-gateway.yaml index c48f0d3c7..be1ea4ea4 100644 --- a/charts/opscenter-features/templates/featuresets/opscenter-networking/voyager-gateway.yaml +++ b/charts/opscenter-features/templates/featuresets/opscenter-networking/voyager-gateway.yaml @@ -17,6 +17,10 @@ gateway-converter: {{ $vals := dig "voyager-gateway" "values" (dict) .Values.helm.releases }} {{ $vals = mergeOverwrite $defaults $vals }} +{{- if eq (include "distro.openshift" $) "true" }} +{{ $vals = mergeOverwrite $vals (dict "global" (dict "distro" .Values.distro)) }} +{{- end }} + apiVersion: ui.k8s.appscode.com/v1alpha1 kind: Feature metadata: @@ -51,12 +55,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: voyager-gateway.yaml - {{- end }} {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/opscenter-features/templates/featuresets/opscenter-observability/opentelemetry/appscode-otel-stack.yaml b/charts/opscenter-features/templates/featuresets/opscenter-observability/opentelemetry/appscode-otel-stack.yaml deleted file mode 100644 index e6a793f45..000000000 --- a/charts/opscenter-features/templates/featuresets/opscenter-observability/opentelemetry/appscode-otel-stack.yaml +++ /dev/null @@ -1,214 +0,0 @@ -{{ $kps := printf ` -kube-prometheus-stack: - alertmanager: - alertmanagerSpec: - image: - registry: %s - - prometheusOperator: - admissionWebhooks: - patch: - image: - registry: %s - image: - registry: %s - prometheusConfigReloader: - image: - registry: %s - thanosImage: - registry: %s - prometheus: - prometheusSpec: - image: - registry: %s - storageSpec: - volumeClaimTemplate: - spec: - # storageClassName: "" - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: 50Gi - serviceMonitorSelector: - matchLabels: - scrape: "disabled" - additionalArgs: - - name: web.enable-otlp-receiver - value: "" - thanosRuler: - thanosRulerSpec: - image: - registry: %s - prometheus-node-exporter: - image: - registry: %s - # run node-exporter on dedicated db nodes - tolerations: - - operator: Exists - prometheus: - monitor: - relabelings: - - sourceLabels: [__meta_kubernetes_pod_node_name] - separator: ; - regex: ^(.*)$ - targetLabel: node - replacement: $1 - action: replace - grafana: - enabled: false - # docker.io - image: - repository: %s - initChownData: - image: - repository: %s - testFramework: - image: %s - downloadDashboardsImage: - repository: %s - imageRenderer: - image: - repository: %s - # quay.io - sidecar: - image: - repository: %s - kubernetesServiceMonitors: - enabled: false - kubeApiServer: - enabled: false - kubelet: - enabled: false - kubeControllerManager: - enabled: false - kubeDns: - enabled: false - coreDns: - enabled: false - kubeEtcd: - enabled: false - kubeScheduler: - enabled: false - kubeProxy: - enabled: false - kubeStateMetrics: - enabled: false - nodeExporter: - enabled: false -` (include "registry.quay" $) - (include "registry.kubernetes" $) - (include "registry.quay" $) - (include "registry.quay" $) - (include "registry.quay" $) - (include "registry.quay" $) - (include "registry.quay" $) - (include "registry.quay" $) - (include "image.dockerHub" (merge (dict "_repo" "grafana/grafana") $)) - (include "image.dockerLibrary" (merge (dict "_repo" "busybox") $)) - (include "image.dockerHub" (merge (dict "_repo" "bats/bats:1.11.0") $)) - (include "image.dockerHub" (merge (dict "_repo" "curlimages/curl") $)) - (include "image.dockerHub" (merge (dict "_repo" "grafana/grafana-image-renderer") $)) - (include "image.quay" (merge (dict "_repo" "kiwigrid/k8s-sidecar") $)) - | fromYaml }} - -{{ $oks := printf ` -opentelemetry-kube-stack: - collectors: - cluster: - image: - repository: %s - daemon: - targetAllocator: - image: %s:0.118.0 - cleanupJob: - image: - repository: %q - tag: %q - defaultCRConfig: - image: - repository: %s - opentelemetry-operator: - manager: - image: - repository: %s - collectorImage: - repository: %s - kubeRBACProxy: - image: - repository: %s -` - (include "image.dockerHub" (merge (dict "_repo" "otel/opentelemetry-collector-contrib") $)) - (include "image.ghcr" (merge (dict "_repo" "open-telemetry/opentelemetry-operator/target-allocator") $)) - ((include "kubectl.image" $) | splitList ":" | first) - ((include "kubectl.image" $) | splitList ":" | last) - (include "image.dockerHub" (merge (dict "_repo" "otel/opentelemetry-collector-k8s") $)) - (include "image.ghcr" (merge (dict "_repo" "open-telemetry/opentelemetry-operator/opentelemetry-operator") $)) - (include "image.dockerHub" (merge (dict "_repo" "otel/opentelemetry-collector-k8s") $)) - (include "image.ghcr" (merge (dict "_repo" "appscode/kube-rbac-proxy") $)) - | fromYaml }} - -{{ $vals := dig "appscode-otel-stack" "values" (dict) .Values.helm.releases }} -{{ $vals = mergeOverwrite dict $kps $oks $vals }} - -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: Feature -metadata: - name: appscode-otel-stack - labels: - app.kubernetes.io/part-of: opscenter-observability -spec: - title: AppsCode OpenTelemetry Stack (ALPHA) - description: | - Collection of components to monitor Kubernetes native applications. - icons: - - src: https://cdn.appscode.com/k8s/icons/menu/cluster.svg - type: image/svg+xml - featureSet: opscenter-observability - featureBlock: appscode-otel-stack - recommended: false - requirements: - features: - - kubedb - - monitoring-operator - - cert-manager - readinessChecks: - resources: - - group: monitoring.coreos.com - version: v1 - kind: Prometheus - workloads: - - group: apps - version: v1 - kind: StatefulSet - optional: "appscode-otel-stack" - selector: - app: appscode-otel-stack-prometheus - app.kubernetes.io/instance: appscode-otel-stack - app.kubernetes.io/part-of: appscode-otel-stack - # rancher-monitoring - - group: apps - version: v1 - kind: StatefulSet - optional: "appscode-otel-stack" - selector: - app: rancher-monitoring-prometheus - app.kubernetes.io/instance: rancher-monitoring - app.kubernetes.io/part-of: rancher-monitoring - chart: - name: appscode-otel-stack - namespace: monitoring - createNamespace: {{ $.Values.helm.createNamespace }} - version: {{ dig "appscode-otel-stack" "version" "" $.Values.helm.releases }} - sourceRef: - kind: HelmRepository - name: appscode-charts-oci - namespace: {{ .Release.Namespace }} - valuesFrom: - {{- if eq (include "distro.openshift" $) "true" }} - - kind: ConfigMap - name: ace-openshift-scc - valuesKey: opentelemetry-kube-stack.yaml - {{- end }} -{{- with $vals }} - {{- dict "values" . | toYaml | nindent 2 }} -{{- end }} \ No newline at end of file diff --git a/charts/opscenter-features/templates/featuresets/opscenter-security/cert-manager/cert-manager.yaml b/charts/opscenter-features/templates/featuresets/opscenter-security/cert-manager/cert-manager.yaml index 4e3d0ae37..e2cea2ddd 100644 --- a/charts/opscenter-features/templates/featuresets/opscenter-security/cert-manager/cert-manager.yaml +++ b/charts/opscenter-features/templates/featuresets/opscenter-security/cert-manager/cert-manager.yaml @@ -29,6 +29,7 @@ startupapicheck: {{- if eq (include "distro.openshift" $) "true" }} +{{ $version := dig "cert-manager" "version" "" .Values.helm.releases }} {{ $oc := printf ` image: tag: %s-ubi @@ -45,11 +46,11 @@ startupapicheck: image: tag: %s-ubi ` - .version - .version - .version - .version - .version + $version + $version + $version + $version + $version | fromYaml }} {{ $vals = mergeOverwrite $vals $oc }} @@ -110,7 +111,6 @@ spec: kind: HelmRepository name: appscode-charts-oci namespace: {{ .Release.Namespace }} - valuesFrom: {{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/features.md b/features.md index f3f8fc3eb..bb3ad7660 100644 --- a/features.md +++ b/features.md @@ -41,9 +41,6 @@ graph TD; kube-prometheus-stack-->monitoring-operator; panopticon-->license-proxyserver; prometheus-adapter-->kube-prometheus-stack; - appscode-otel-stack-->kubedb; - appscode-otel-stack-->monitoring-operator; - appscode-otel-stack-->cert-manager; gatekeeper-constraints-->gatekeeper; gatekeeper-constraints-->gatekeeper-templates; gatekeeper-grafana-dashboards-->gatekeeper; diff --git a/go.mod b/go.mod index 5b2361067..c34bf227e 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( ) require ( - filippo.io/edwards25519 v1.1.0 // indirect + filippo.io/edwards25519 v1.1.1 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/Masterminds/sprig/v3 v3.3.0 // indirect diff --git a/go.sum b/go.sum index 8985b3e1a..1fbbf0452 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= +filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= diff --git a/vendor/filippo.io/edwards25519/extra.go b/vendor/filippo.io/edwards25519/extra.go index d152d68ff..ab2e44a51 100644 --- a/vendor/filippo.io/edwards25519/extra.go +++ b/vendor/filippo.io/edwards25519/extra.go @@ -265,6 +265,7 @@ func (v *Point) MultiScalarMult(scalars []*Scalar, points []*Point) *Point { tmp1 := &projP1xP1{} tmp2 := &projP2{} // Lookup-and-add the appropriate multiple of each input point + v.Set(NewIdentityPoint()) for j := range tables { tables[j].SelectInto(multiple, digits[j][63]) tmp1.Add(v, multiple) // tmp1 = v + x_(j,63)*Q in P1xP1 coords diff --git a/vendor/modules.txt b/vendor/modules.txt index c10b4a2a7..3ed675f8b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# filippo.io/edwards25519 v1.1.0 +# filippo.io/edwards25519 v1.1.1 ## explicit; go 1.20 filippo.io/edwards25519 filippo.io/edwards25519/field