From f57d0c1b57166e82cca18243f4ce147e606ea5d9 Mon Sep 17 00:00:00 2001 From: nicholasSSUSE Date: Mon, 11 Nov 2024 18:29:35 -0300 Subject: [PATCH 1/3] clean release.yaml --- release.yaml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/release.yaml b/release.yaml index ca03b81b24..8b13789179 100644 --- a/release.yaml +++ b/release.yaml @@ -1,16 +1 @@ -elemental: - - 103.4.1+up1.6.5 -elemental-crd: - - 103.4.1+up1.6.5 -rancher-webhook: - - 103.0.12+up0.4.13 -rancher-cis-benchmark: - - 5.6.0 -rancher-cis-benchmark-crd: - - 5.6.0 -fleet: - - 103.1.10+up0.9.11 -fleet-crd: - - 103.1.10+up0.9.11 -fleet-agent: - - 103.1.10+up0.9.11 + From 5eb7039b2af5883874d2da62054b1d0d18f2caae Mon Sep 17 00:00:00 2001 From: Diogo Souza Date: Tue, 17 Sep 2024 20:29:10 -0300 Subject: [PATCH 2/3] New UI plugin operator version (#4422) --- ...ui-plugin-operator-crd-103.0.3+up0.2.2.tgz | Bin 0 -> 822 bytes .../ui-plugin-operator-103.0.3+up0.2.2.tgz | Bin 0 -> 4351 bytes .../103.0.3+up0.2.2/Chart.yaml | 10 ++ .../103.0.3+up0.2.2/README.md | 2 + .../103.0.3+up0.2.2/templates/crds.yaml | 61 +++++++++ .../103.0.3+up0.2.2/Chart.yaml | 19 +++ .../103.0.3+up0.2.2/app-readme.md | 21 +++ .../103.0.3+up0.2.2/templates/_helpers.tpl | 89 +++++++++++++ .../templates/dashboardrole.yaml | 33 +++++ .../103.0.3+up0.2.2/templates/deployment.yaml | 67 ++++++++++ .../103.0.3+up0.2.2/templates/hardened.yaml | 123 ++++++++++++++++++ .../103.0.3+up0.2.2/templates/service.yaml | 15 +++ .../templates/serviceaccount.yaml | 101 ++++++++++++++ .../templates/validate-psp-install.yaml | 7 + .../103.0.3+up0.2.2/values.yaml | 69 ++++++++++ index.yaml | 37 ++++++ .../generated-changes/patch/Chart.yaml.patch | 16 --- packages/ui-plugin-operator/package.yaml | 4 +- release.yaml | 5 +- 19 files changed, 660 insertions(+), 19 deletions(-) create mode 100644 assets/ui-plugin-operator-crd/ui-plugin-operator-crd-103.0.3+up0.2.2.tgz create mode 100644 assets/ui-plugin-operator/ui-plugin-operator-103.0.3+up0.2.2.tgz create mode 100644 charts/ui-plugin-operator-crd/103.0.3+up0.2.2/Chart.yaml create mode 100644 charts/ui-plugin-operator-crd/103.0.3+up0.2.2/README.md create mode 100644 charts/ui-plugin-operator-crd/103.0.3+up0.2.2/templates/crds.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/Chart.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/app-readme.md create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/_helpers.tpl create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/dashboardrole.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/deployment.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/hardened.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/service.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/serviceaccount.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/templates/validate-psp-install.yaml create mode 100644 charts/ui-plugin-operator/103.0.3+up0.2.2/values.yaml delete mode 100644 packages/ui-plugin-operator/generated-changes/patch/Chart.yaml.patch diff --git a/assets/ui-plugin-operator-crd/ui-plugin-operator-crd-103.0.3+up0.2.2.tgz b/assets/ui-plugin-operator-crd/ui-plugin-operator-crd-103.0.3+up0.2.2.tgz new file mode 100644 index 0000000000000000000000000000000000000000..101a3f93d3f26b5d6dbd064d4ab0b26d044559ba GIT binary patch literal 822 zcmV-61Ihd!iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI&yZ{s!)^;y4Su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7o%(d#3dD&hr z(y095kAw7HI!Q7{z602RLpB zR)4L=HW0q3z_?2~K+lMVbE1GKB@#-^tSq9Y?dWt=yM}3XfhdOwnHzFWfPkWW$`ITH z9r)q8`7YP7h5W>DZ$-p9CwH=LsW>cFX4$Q7nNtD;KFyG2C8$sE0_VsLVa)&;;RRuA z0SQCGp~#nWeQDUKyljMFspI}^fR&e&SbiBxafTd}CK@f>tV+WQUsWVCN8?E$?T)uF zoRYA6)ed1asgVru!XwN*SAN=VO<@~QC-KYJP^zMpbPKJ(sA#2&09nOj1 z%6?H^lQ?FRn*A^n=Z3r$F)ZB1jGd389K*fK1viXnWyLzKE-w+=uHEKgC+)bXgVEgg zQkWX7s5b0BBW$u12c=l6uGKS@YQm^1^OXd*7L9WVod**bdW-DkDqp zBiTp^r1!GCSk2#CQ&~gTu7^P^GfbVLCX_W6$i`=lR#>il ty?%w{Ia@RvoNB^TB2yJVxq= 1.16.0-0 < 1.29.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0' + catalog.cattle.io/release-name: ui-plugin-operator +apiVersion: v1 +appVersion: 0.1.3 +description: A UI Plugin Operator Chart for plugin management in Rancher +keywords: +- applications +- infrastructure +name: ui-plugin-operator +type: application +version: 103.0.3+up0.2.2 diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/app-readme.md b/charts/ui-plugin-operator/103.0.3+up0.2.2/app-readme.md new file mode 100644 index 0000000000..3473271768 --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/app-readme.md @@ -0,0 +1,21 @@ +# Rancher UI Plugin Operator + +This chart works together with the Rancher UI extensions feature to enable the ability to install UI extensions in your cluster. + +## Upgrading to Kubernetes v1.25+ + ​ +Starting in Kubernetes v1.25, [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) have been removed from the Kubernetes API. + ​ +As a result, **before upgrading to Kubernetes v1.25** (or on a fresh install in a Kubernetes v1.25+ cluster), users are expected to perform an in-place upgrade of this chart with `global.cattle.psp.enabled` set to `false` if it has been previously set to `true`. +​ +> **Note:** +> In this chart release, any previous field that was associated with any PSP resources have been removed in favor of a single global field: `global.cattle.psp.enabled`. + ​ +> **Note:** +> If you upgrade your cluster to Kubernetes v1.25+ before removing PSPs via a `helm upgrade` (even if you manually clean up resources), **it will leave the Helm release in a broken state within the cluster such that further Helm operations will not work (`helm uninstall`, `helm upgrade`, etc.).** +> +> If your charts get stuck in this state, please consult the Rancher docs on how to clean up your Helm release secrets. +​ +Upon setting `global.cattle.psp.enabled` to false, the chart will remove any PSP resources deployed on its behalf from the cluster. This is the default setting for this chart. +​ +As a replacement for PSPs, [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) should be used. Please consult the Rancher docs for more details on how to configure your chart release namespaces to work with the new Pod Security Admission and apply Pod Security Standards. diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/_helpers.tpl b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/_helpers.tpl new file mode 100644 index 0000000000..0d41d827fc --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/_helpers.tpl @@ -0,0 +1,89 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "ui-plugin-operator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ui-plugin-operator.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ui-plugin-operator.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ui-plugin-operator.labels" -}} +helm.sh/chart: {{ include "ui-plugin-operator.chart" . }} +{{ include "ui-plugin-operator.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ui-plugin-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ui-plugin-operator.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ui-plugin-operator.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ui-plugin-operator.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +beta.kubernetes.io/os: linux +{{- else -}} +kubernetes.io/os: linux +{{- end -}} +{{- end -}} diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/dashboardrole.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/dashboardrole.yaml new file mode 100644 index 0000000000..e8b7c456cf --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/dashboardrole.yaml @@ -0,0 +1,33 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Chart.Name }}-dashboard + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +rules: +- apiGroups: + - "" + resources: + - services/proxy + resourceNames: + - "http:{{ .Chart.Name }}:{{ .Values.service.port }}" + - "https:{{ .Chart.Name }}:{{ .Values.service.port }}" + verbs: + - '*' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Chart.Name }}-dashboard + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ .Chart.Name }}-dashboard +subjects: +- kind: Group + name: system:authenticated + apiGroup: rbac.authorization.k8s.io diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/deployment.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/deployment.yaml new file mode 100644 index 0000000000..7cf9e5dc7e --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/deployment.yaml @@ -0,0 +1,67 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "ui-plugin-operator.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicas }} + {{- end }} + selector: + matchLabels: + {{- include "ui-plugin-operator.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ui-plugin-operator.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} +{{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 8 }} +{{- end }} + serviceAccountName: {{ .Chart.Name }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 80 + protocol: TCP + args: + - {{ template "ui-plugin-operator.name" . }} +{{- if .Values.debug }} + - --debug + - --debug-level={{ .Values.debugLevel }} +{{- end }} +{{- if .Values.additionalArgs }} +{{- toYaml .Values.additionalArgs | nindent 10 }} +{{- end }} + # livenessProbe: + # httpGet: + # path: / + # port: http + # readinessProbe: + # httpGet: + # path: / + # port: http + resources: + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/hardened.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/hardened.yaml new file mode 100644 index 0000000000..9d11df86cc --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/hardened.yaml @@ -0,0 +1,123 @@ +{{- $namespaces := dict "_0" .Release.Namespace -}} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ .Chart.Name }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }}-patch-sa + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + template: + metadata: + name: {{ .Chart.Name }}-patch-sa + labels: + app: {{ .Chart.Name }}-patch-sa + spec: + serviceAccountName: {{ .Chart.Name }}-patch-sa + securityContext: + runAsNonRoot: true + runAsUser: 1000 + restartPolicy: Never + containers: + {{- range $_, $ns := $namespaces }} + - name: patch-sa-{{ $ns }} + image: {{ template "system_default_registry" $ }}{{ $.Values.global.kubectl.repository }}:{{ $.Values.global.kubectl.tag }} + imagePullPolicy: {{ $.Values.global.kubectl.pullPolicy }} + command: ["kubectl", "patch", "serviceaccount", "default", "-p", "{\"automountServiceAccountToken\": false}"] + args: ["-n", "{{ $ns }}"] + {{- end }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ .Chart.Name }}-patch-sa + labels: + app: {{ .Chart.Name }}-patch-sa +rules: +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: ['get', 'patch'] +{{- if .Values.global.cattle.psp.enabled }} +- apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ .Chart.Name }}-patch-sa +{{- end }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ .Chart.Name }}-patch-sa + labels: + app: {{ .Chart.Name }}-patch-sa +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ .Chart.Name }}-patch-sa +subjects: +- kind: ServiceAccount + name: {{ .Chart.Name }}-patch-sa + namespace: {{ .Release.Namespace }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Chart.Name }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }}-patch-sa +--- +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ .Chart.Name }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }}-patch-sa +spec: + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'secret' +{{- end }} +{{- range $_, $ns := $namespaces }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: default-allow-all + namespace: {{ $ns }} +spec: + podSelector: {} + ingress: + - {} + egress: + - {} + policyTypes: + - Ingress + - Egress +{{- end }} diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/service.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/service.yaml new file mode 100644 index 0000000000..7c4e735e9d --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "ui-plugin-operator.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + name: http + selector: + {{- include "ui-plugin-operator.selectorLabels" . | nindent 4 }} diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/serviceaccount.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/serviceaccount.yaml new file mode 100644 index 0000000000..d43d0492b0 --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/serviceaccount.yaml @@ -0,0 +1,101 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +rules: +- apiGroups: [""] + resources: ["configmaps"] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ .Chart.Name }} +subjects: +- kind: ServiceAccount + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +rules: +- apiGroups: ["catalog.cattle.io"] + resources: + - uiplugins + - uiplugins/status + verbs: ["*"] +- apiGroups: ["coordination.k8s.io"] + resources: + - leases + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ .Chart.Name }} +subjects: +- kind: ServiceAccount + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +--- +{{- if .Values.global.cattle.psp.enabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Chart.Name }} +spec: + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'secret' +{{- end }} diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/validate-psp-install.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/validate-psp-install.yaml new file mode 100644 index 0000000000..a30c59d3b7 --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/templates/validate-psp-install.yaml @@ -0,0 +1,7 @@ +#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} +#{{- if .Values.global.cattle.psp.enabled }} +#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} +#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}} +#{{- end }} +#{{- end }} +#{{- end }} diff --git a/charts/ui-plugin-operator/103.0.3+up0.2.2/values.yaml b/charts/ui-plugin-operator/103.0.3+up0.2.2/values.yaml new file mode 100644 index 0000000000..ef014b63a7 --- /dev/null +++ b/charts/ui-plugin-operator/103.0.3+up0.2.2/values.yaml @@ -0,0 +1,69 @@ +# Default values for sample. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: rancher/ui-plugin-operator + pullPolicy: Always + tag: "v0.1.3" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +service: + type: ClusterIP + port: 80 + targetPort: 8080 + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + +replicas: 1 + +resources: {} + +securityContext: + runAsNonRoot: true + runAsUser: 1000 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +podAnnotations: [] + +additionalArgs: [] + +global: + cattle: + systemDefaultRegistry: "" + psp: + enabled: false # PSP enablement should default to false + kubectl: + repository: rancher/kubectl + tag: v1.20.2 + pullPolicy: IfNotPresent + rbac: + ## Create RBAC resources for ServiceAccounts and users + ## + enabled: false + # create: true + # userRoles: + # ## Create default user ClusterRoles to allow users to interact with Prometheus CRs, ConfigMaps, and Secrets + # create: true + # ## Aggregate default user ClusterRoles into default k8s ClusterRoles + # aggregateToDefaultRoles: true + + # pspEnabled: true + # pspAnnotations: {} + +debug: false +debugLevel: 0 diff --git a/index.yaml b/index.yaml index 31068a3fe9..4a7deef2af 100755 --- a/index.yaml +++ b/index.yaml @@ -25590,6 +25590,29 @@ entries: - assets/system-upgrade-controller/system-upgrade-controller-100.0.0+up0.3.0.tgz version: 100.0.0+up0.3.0 ui-plugin-operator: + - annotations: + catalog.cattle.io/auto-install: ui-plugin-operator-crd=match + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: UI Plugin Operator + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.29.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0' + catalog.cattle.io/release-name: ui-plugin-operator + apiVersion: v1 + appVersion: 0.1.3 + created: "2024-09-12T00:45:41.304113-03:00" + description: A UI Plugin Operator Chart for plugin management in Rancher + digest: f18a89fc30f8df5a42fea717151343b6326edfe0aab7e09f251c9ea229b9747c + keywords: + - applications + - infrastructure + name: ui-plugin-operator + type: application + urls: + - assets/ui-plugin-operator/ui-plugin-operator-103.0.3+up0.2.2.tgz + version: 103.0.3+up0.2.2 - annotations: catalog.cattle.io/auto-install: ui-plugin-operator-crd=match catalog.cattle.io/certified: rancher @@ -25752,6 +25775,20 @@ entries: - assets/ui-plugin-operator/ui-plugin-operator-101.0.0+up0.1.0.tgz version: 101.0.0+up0.1.0 ui-plugin-operator-crd: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/release-name: ui-plugin-operator-crd + apiVersion: v1 + created: "2024-09-11T19:38:40.723463-03:00" + description: Installs the CRDs for ui-plugin-operator. + digest: fe6d83a7a42cbf62a9661babd7d112181badc2312b863ab3566097bf14a39e02 + name: ui-plugin-operator-crd + type: application + urls: + - assets/ui-plugin-operator-crd/ui-plugin-operator-crd-103.0.3+up0.2.2.tgz + version: 103.0.3+up0.2.2 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/hidden: "true" diff --git a/packages/ui-plugin-operator/generated-changes/patch/Chart.yaml.patch b/packages/ui-plugin-operator/generated-changes/patch/Chart.yaml.patch deleted file mode 100644 index 22696ec579..0000000000 --- a/packages/ui-plugin-operator/generated-changes/patch/Chart.yaml.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- charts-original/Chart.yaml -+++ charts/Chart.yaml -@@ -2,11 +2,11 @@ - catalog.cattle.io/auto-install: ui-plugin-operator-crd=match - catalog.cattle.io/certified: rancher - catalog.cattle.io/display-name: UI Plugin Operator -- catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.27.0-0' -+ catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.29.0-0' - catalog.cattle.io/namespace: cattle-ui-plugin-system - catalog.cattle.io/os: linux - catalog.cattle.io/permits-os: linux, windows -- catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' -+ catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0' - catalog.cattle.io/release-name: ui-plugin-operator - apiVersion: v1 - appVersion: 0.1.1 diff --git a/packages/ui-plugin-operator/package.yaml b/packages/ui-plugin-operator/package.yaml index 94a8fed65a..312def2dea 100644 --- a/packages/ui-plugin-operator/package.yaml +++ b/packages/ui-plugin-operator/package.yaml @@ -1,7 +1,7 @@ url: https://github.com/rancher/ui-plugin-operator.git subdirectory: charts/ui-plugin-operator -commit: 4f3ccc34f78f1cd828c83b6f37b6384e1ecb8d5f -version: 103.0.2 +commit: d8d90e861ef16b4cadf4acb1248aba18f01b9772 +version: 103.0.3 additionalCharts: - workingDir: charts-crd crdOptions: diff --git a/release.yaml b/release.yaml index 8b13789179..750efabb96 100644 --- a/release.yaml +++ b/release.yaml @@ -1 +1,4 @@ - +ui-plugin-operator: + - 103.0.3+up0.2.2 +ui-plugin-operator-crd: + - 103.0.3+up0.2.2 From 240a74330cc07de2b81b990b1baaa908a23b64ee Mon Sep 17 00:00:00 2001 From: rancherbot Date: Mon, 11 Nov 2024 21:44:06 +0000 Subject: [PATCH 3/3] Updating resync.yaml --- regsync.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/regsync.yaml b/regsync.yaml index a55774b6d9..7ec2fa705a 100644 --- a/regsync.yaml +++ b/regsync.yaml @@ -2038,6 +2038,7 @@ sync: allow: - v0.1.0 - v0.1.1 + - v0.1.3 - source: docker.io/rancher/windows_exporter-package target: '{{ env "REGISTRY_ENDPOINT" }}/rancher/windows_exporter-package' type: repository