From e03191e0fa6fa93a9dd6a33bcb33e09accf1846f Mon Sep 17 00:00:00 2001 From: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:31:12 -0500 Subject: [PATCH] migrate(orbital-sync): New common since its stable (#15713) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 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 - [ ] ⬆️ 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: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> --- charts/incubator/orbital-sync/Chart.yaml | 6 +- .../{_pihole-hosts.tpl => _secrets.tpl} | 18 ++--- .../orbital-sync/templates/common.yaml | 11 +-- charts/incubator/orbital-sync/values.yaml | 69 ++++++++++--------- 4 files changed, 52 insertions(+), 52 deletions(-) rename charts/incubator/orbital-sync/templates/{_pihole-hosts.tpl => _secrets.tpl} (65%) diff --git a/charts/incubator/orbital-sync/Chart.yaml b/charts/incubator/orbital-sync/Chart.yaml index 9d779a3d579..2ee41acead5 100644 --- a/charts/incubator/orbital-sync/Chart.yaml +++ b/charts/incubator/orbital-sync/Chart.yaml @@ -1,8 +1,8 @@ kubeVersion: ">=1.24.0" apiVersion: v2 name: orbital-sync -version: 2.0.10 -appVersion: 1.3.0 +version: 3.0.0 +appVersion: 1.5.2 description: Orbital Sync synchronizes multiple Pi-hole instances for high availability. home: https://truecharts.org/charts/incubator/orbital-sync icon: https://truecharts.org/img/hotlink-ok/chart-icons/orbital-sync.png @@ -21,7 +21,7 @@ keywords: - DNS dependencies: - name: common - version: 11.1.2 + version: 15.3.1 repository: https://library-charts.truecharts.org condition: "" alias: "" diff --git a/charts/incubator/orbital-sync/templates/_pihole-hosts.tpl b/charts/incubator/orbital-sync/templates/_secrets.tpl similarity index 65% rename from charts/incubator/orbital-sync/templates/_pihole-hosts.tpl rename to charts/incubator/orbital-sync/templates/_secrets.tpl index d92d4489a3e..3ce19cefcc3 100644 --- a/charts/incubator/orbital-sync/templates/_pihole-hosts.tpl +++ b/charts/incubator/orbital-sync/templates/_secrets.tpl @@ -1,16 +1,8 @@ -{{- define "orbital.hosts" -}} - -{{- $secretName := printf "%s-config" (include "tc.common.names.fullname" .) }} - ---- - -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} +{{/* Define the secrets */}} +{{- define "orbital.secrets" -}} +{{- $secretName := (printf "%s-orbital-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} +{{- $orbitalprevious := lookup "v1" "Secret" .Release.Namespace $secretName }} +enabled: true data: PRIMARY_HOST_BASE_URL: {{ .Values.orbital.primary_host_base_url | b64enc }} PRIMARY_HOST_PASSWORD: {{ .Values.orbital.primary_host_password | b64enc }} diff --git a/charts/incubator/orbital-sync/templates/common.yaml b/charts/incubator/orbital-sync/templates/common.yaml index 9a827a8e82c..0851d0a328b 100644 --- a/charts/incubator/orbital-sync/templates/common.yaml +++ b/charts/incubator/orbital-sync/templates/common.yaml @@ -1,8 +1,11 @@ {{/* Make sure all variables are set properly */}} -{{- include "tc.common.loader.init" . }} +{{- include "tc.v1.common.loader.init" . }} -{{/* Render config */}} -{{- include "orbital.hosts" . }} +{{/* Render secrets for orbital-sync */}} +{{- $secrets := include "orbital.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "orbital-secrets" $secrets -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/orbital-sync/values.yaml b/charts/incubator/orbital-sync/values.yaml index 8904ea1893b..0e296d0f83d 100644 --- a/charts/incubator/orbital-sync/values.yaml +++ b/charts/incubator/orbital-sync/values.yaml @@ -1,18 +1,43 @@ image: - repository: tccr.io/truecharts/orbital-sync + repository: ghcr.io/mattwebbio/orbital-sync pullPolicy: IfNotPresent - tag: 1.3.0@sha256:d8a33d1de564f2f54f7112ec43092a81e58e4359aa00e256e22f765b1f2bfed0 + tag: 1.5.2@sha256:ade616e16ccb3442e9ad648128d9f97db9b3c34c2ef78764e650ff45d624c075 securityContext: - readOnlyRootFilesystem: false + container: + readOnlyRootFilesystem: false -probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false +workload: + main: + podSpec: + containers: + main: + env: + INTERVAL_MINUTES: 30 + SYNC_WHITELIST: true + SYNC_REGEX_WHITELIST: true + SYNC_BLACKLIST: true + SYNC_REGEXLIST: true + SYNC_ADLIST: true + SYNC_CLIENT: true + SYNC_GROUP: true + SYNC_AUDITLOG: false + SYNC_STATICDHCPLEASES: false + SYNC_LOCALDNSRECORDS: true + SYNC_LOCALCNAMERECORDS: true + SYNC_FLUSHTABLES: true + RUN_ONCE: false + VERBOSE: false + envFrom: + - secretRef: + name: "orbital-secrets" + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false service: main: @@ -21,27 +46,6 @@ service: main: enabled: false -envFrom: - - secretRef: - name: '{{ include "tc.common.names.fullname" . }}-config' - -env: - INTERVAL_MINUTES: 30 - SYNC_WHITELIST: true - SYNC_REGEX_WHITELIST: true - SYNC_BLACKLIST: true - SYNC_REGEXLIST: true - SYNC_ADLIST: true - SYNC_CLIENT: true - SYNC_GROUP: true - SYNC_AUDITLOG: false - SYNC_STATICDHCPLEASES: false - SYNC_LOCALDNSRECORDS: true - SYNC_LOCALCNAMERECORDS: true - SYNC_FLUSHTABLES: true - RUN_ONCE: false - VERBOSE: false - orbital: honeybadger_api_key: "" primary_host_base_url: http://pihole.local @@ -58,4 +62,5 @@ persistence: mountPath: "/app" portal: - enabled: false + open: + enabled: false