From aaec378ff25d61a8733377a52cb20943e928eccc Mon Sep 17 00:00:00 2001 From: MaverickD650 <92877124+MaverickD650@users.noreply.github.com> Date: Thu, 4 May 2023 20:36:30 +0100 Subject: [PATCH] fix(portainer): Port to new common BREAKING CHANGES (#8755) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Fixed the errors in the part 4 PR and seems to install correctly. Can't merge into that PR branch without causing a mess so did it this way instead. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [X] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Previously tested on CI in my own fork. **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: MaverickD650 <92877124+MaverickD650@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- .../stable/portainer-ce/templates/common.yaml | 10 --- .../{portainer-ce => portainer}/.helmignore | 0 .../{portainer-ce => portainer}/CHANGELOG.md | 0 .../{portainer-ce => portainer}/Chart.yaml | 7 +- .../{portainer-ce => portainer}/README.md | 0 .../docs/img/add_repo.png | Bin .../docs/img/replace_repo.png | Bin .../docs/installation-notes.md | 0 .../{portainer-ce => portainer}/icon.png | Bin .../questions.yaml | 1 - charts/stable/portainer/templates/NOTES.txt | 1 + .../templates/_args.tpl | 0 charts/stable/portainer/templates/common.yaml | 10 +++ .../{portainer-ce => portainer}/values.yaml | 60 ++++++++---------- 14 files changed, 39 insertions(+), 50 deletions(-) delete mode 100644 charts/stable/portainer-ce/templates/common.yaml rename charts/stable/{portainer-ce => portainer}/.helmignore (100%) rename charts/stable/{portainer-ce => portainer}/CHANGELOG.md (100%) rename charts/stable/{portainer-ce => portainer}/Chart.yaml (90%) rename charts/stable/{portainer-ce => portainer}/README.md (100%) rename charts/stable/{portainer-ce => portainer}/docs/img/add_repo.png (100%) rename charts/stable/{portainer-ce => portainer}/docs/img/replace_repo.png (100%) rename charts/stable/{portainer-ce => portainer}/docs/installation-notes.md (100%) rename charts/stable/{portainer-ce => portainer}/icon.png (100%) rename charts/stable/{portainer-ce => portainer}/questions.yaml (99%) create mode 100644 charts/stable/portainer/templates/NOTES.txt rename charts/stable/{portainer-ce => portainer}/templates/_args.tpl (100%) create mode 100644 charts/stable/portainer/templates/common.yaml rename charts/stable/{portainer-ce => portainer}/values.yaml (63%) diff --git a/charts/stable/portainer-ce/templates/common.yaml b/charts/stable/portainer-ce/templates/common.yaml deleted file mode 100644 index 31fa3252a25..00000000000 --- a/charts/stable/portainer-ce/templates/common.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{/* Make sure all variables are set properly */}} -{{- include "tc.common.loader.init" . }} - -{{- $newArgs := (include "portainer.args" . | fromYaml) }} -{{- $_ := set .Values "newArgs" $newArgs -}} -{{- $args := concat .Values.args .Values.newArgs.args }} -{{- $_ := set .Values "args" $args -}} - -{{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} diff --git a/charts/stable/portainer-ce/.helmignore b/charts/stable/portainer/.helmignore similarity index 100% rename from charts/stable/portainer-ce/.helmignore rename to charts/stable/portainer/.helmignore diff --git a/charts/stable/portainer-ce/CHANGELOG.md b/charts/stable/portainer/CHANGELOG.md similarity index 100% rename from charts/stable/portainer-ce/CHANGELOG.md rename to charts/stable/portainer/CHANGELOG.md diff --git a/charts/stable/portainer-ce/Chart.yaml b/charts/stable/portainer/Chart.yaml similarity index 90% rename from charts/stable/portainer-ce/Chart.yaml rename to charts/stable/portainer/Chart.yaml index e1d709198a1..9e065d09149 100644 --- a/charts/stable/portainer-ce/Chart.yaml +++ b/charts/stable/portainer/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "2.18.1" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 12.6.1 description: Container management made easy home: https://truecharts.org/charts/stable/portainer-ce icon: https://truecharts.org/img/hotlink-ok/chart-icons/portainer-ce.png @@ -14,14 +14,13 @@ maintainers: - email: info@truecharts.org name: TrueCharts url: https://truecharts.org -name: portainer-ce +name: portainer sources: - https://github.com/truecharts/charts/tree/master/charts/stable/portainer-ce - https://docs.portainer.io/start/install-ce/server - https://docs.portainer.io/start/install/server -version: 3.0.15 +version: 4.0.0 annotations: truecharts.org/catagories: | - management truecharts.org/SCALE-support: "true" - truecharts.org/grade: U diff --git a/charts/stable/portainer-ce/README.md b/charts/stable/portainer/README.md similarity index 100% rename from charts/stable/portainer-ce/README.md rename to charts/stable/portainer/README.md diff --git a/charts/stable/portainer-ce/docs/img/add_repo.png b/charts/stable/portainer/docs/img/add_repo.png similarity index 100% rename from charts/stable/portainer-ce/docs/img/add_repo.png rename to charts/stable/portainer/docs/img/add_repo.png diff --git a/charts/stable/portainer-ce/docs/img/replace_repo.png b/charts/stable/portainer/docs/img/replace_repo.png similarity index 100% rename from charts/stable/portainer-ce/docs/img/replace_repo.png rename to charts/stable/portainer/docs/img/replace_repo.png diff --git a/charts/stable/portainer-ce/docs/installation-notes.md b/charts/stable/portainer/docs/installation-notes.md similarity index 100% rename from charts/stable/portainer-ce/docs/installation-notes.md rename to charts/stable/portainer/docs/installation-notes.md diff --git a/charts/stable/portainer-ce/icon.png b/charts/stable/portainer/icon.png similarity index 100% rename from charts/stable/portainer-ce/icon.png rename to charts/stable/portainer/icon.png diff --git a/charts/stable/portainer-ce/questions.yaml b/charts/stable/portainer/questions.yaml similarity index 99% rename from charts/stable/portainer-ce/questions.yaml rename to charts/stable/portainer/questions.yaml index 1146c90c52d..043d92528df 100644 --- a/charts/stable/portainer-ce/questions.yaml +++ b/charts/stable/portainer/questions.yaml @@ -10,7 +10,6 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} - - variable: imageSelector group: Container Image label: Select Edition diff --git a/charts/stable/portainer/templates/NOTES.txt b/charts/stable/portainer/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/stable/portainer/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/stable/portainer-ce/templates/_args.tpl b/charts/stable/portainer/templates/_args.tpl similarity index 100% rename from charts/stable/portainer-ce/templates/_args.tpl rename to charts/stable/portainer/templates/_args.tpl diff --git a/charts/stable/portainer/templates/common.yaml b/charts/stable/portainer/templates/common.yaml new file mode 100644 index 00000000000..d95310e98fb --- /dev/null +++ b/charts/stable/portainer/templates/common.yaml @@ -0,0 +1,10 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{- $newArgs := (include "portainer.args" . | fromYaml) }} +{{- $_ := set .Values "newArgs" $newArgs -}} +{{- $args := concat ((get .Values.workload.main.podSpec.containers.main "args") | default list) .Values.newArgs.args }} +{{- $_ := set .Values.workload.main.podSpec.containers.main "args" $args -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/stable/portainer-ce/values.yaml b/charts/stable/portainer/values.yaml similarity index 63% rename from charts/stable/portainer-ce/values.yaml rename to charts/stable/portainer/values.yaml index a118f3b0475..180fca0848b 100644 --- a/charts/stable/portainer-ce/values.yaml +++ b/charts/stable/portainer/values.yaml @@ -5,11 +5,9 @@ image: imageBe: repository: tccr.io/truecharts/portainer-be - tag: 2.17.1@sha256:d83c8fa439ce749d4bdc68710b9c8ca2ae6e2a54b963ec47ddba6d97d4a34f36 + tag: 2.18.1@sha256:24860264b69f386a5445c64bbf71104616907151c0cc28eb42b65cc342cc8b31 pullPolicy: IfNotPresent -imageSelector: image - portainer: # Logo URL logo: "" @@ -18,16 +16,16 @@ portainer: # Sets Snapshot interval snapshot_interval: 5m hide_labels: - # - label1=value1 - # - label2=value2 - + # - label1=value1 + # - label2=value2 serviceAccount: main: enabled: true - + primary: true rbac: main: enabled: true + primary: true rules: - apiGroups: - "*" @@ -35,36 +33,12 @@ rbac: - "*" verbs: - "*" - -probes: - liveness: - custom: true - spec: - httpGet: - path: / - port: 9443 - scheme: HTTPS - readiness: - custom: true - spec: - httpGet: - path: / - port: 9443 - scheme: HTTPS - startup: - custom: true - spec: - httpGet: - path: / - port: 9443 - scheme: HTTPS - service: main: ports: main: port: 10400 - protocol: HTTPS + protocol: https targetPort: 9443 edge: enabled: true @@ -73,7 +47,6 @@ service: enabled: true port: 10401 targetPort: 10401 - persistence: data: enabled: true @@ -82,6 +55,23 @@ persistence: enabled: true mountPath: "/.cache" type: emptyDir - portal: - enabled: true + open: + enabled: true + +workload: + main: + podSpec: + containers: + main: + imageSelector: image + probes: + liveness: + port: 9443 + scheme: https + readiness: + port: 9443 + scheme: https + startup: + port: 9443 + scheme: https