fix(ci): use our helm charts to install dependencies from, to ensure operator validation works in ci (#11093)
**Description** Currently CI uses static manifests for fetching operator dependencies during testing. Lets use helm-charts instead. **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [x] 🪛 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?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ 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._
This commit is contained in:
@@ -146,18 +146,28 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
- name: Prep Helm
|
||||
run: |
|
||||
helm repo add truecharts https://charts.truecharts.org
|
||||
helm repo add truecharts-deps https://deps.truecharts.org
|
||||
helm repo add truecharts-library https://library-charts.truecharts.org
|
||||
helm repo add jetstack https://charts.jetstack.io
|
||||
helm repo update
|
||||
|
||||
- name: Add Dependencies
|
||||
run: |
|
||||
## TODO: Move to our Helm Charts
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/operators/metallb-config" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml --server-side --force-conflicts || echo "error fetching metallb manifest"
|
||||
helm install metallb truecharts/metallb --namespace metallb --create-namespace --wait
|
||||
fi
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/enterprise/clusterissuer" ]]; then
|
||||
helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/cloudnative-pg" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.20/releases/cnpg-1.20.0.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest"
|
||||
helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then
|
||||
kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest"
|
||||
helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
@@ -209,13 +219,17 @@ jobs:
|
||||
- name: Add Dependencies
|
||||
run: |
|
||||
if [[ "${{ matrix.chart }}" == "charts/operators/metallb-config" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml --server-side --force-conflicts || echo "error fetching metallb manifest"
|
||||
helm install metallb truecharts/metallb --namespace metallb --create-namespace --wait
|
||||
fi
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/enterprise/clusterissuer" ]]; then
|
||||
helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/cloudnative-pg" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest"
|
||||
helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then
|
||||
kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest"
|
||||
helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
@@ -267,13 +281,17 @@ jobs:
|
||||
- name: Add Dependencies
|
||||
run: |
|
||||
if [[ "${{ matrix.chart }}" == "charts/operators/metallb-config" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml --server-side --force-conflicts || echo "error fetching metallb manifest"
|
||||
helm install metallb truecharts/metallb --namespace metallb --create-namespace --wait
|
||||
fi
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/enterprise/clusterissuer" ]]; then
|
||||
helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/cloudnative-pg" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest"
|
||||
helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then
|
||||
kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest"
|
||||
helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
@@ -325,13 +343,17 @@ jobs:
|
||||
- name: Add Dependencies
|
||||
run: |
|
||||
if [[ "${{ matrix.chart }}" == "charts/operators/metallb-config" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml --server-side --force-conflicts || echo "error fetching metallb manifest"
|
||||
helm install metallb truecharts/metallb --namespace metallb --create-namespace --wait
|
||||
fi
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/enterprise/clusterissuer" ]]; then
|
||||
helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/cloudnative-pg" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest"
|
||||
helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then
|
||||
kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest"
|
||||
helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
@@ -383,15 +405,18 @@ jobs:
|
||||
- name: Add Dependencies
|
||||
run: |
|
||||
if [[ "${{ matrix.chart }}" == "charts/operators/metallb-config" ]]; then
|
||||
kubectl apply -f --server-side --force-conflicts https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml
|
||||
helm install metallb truecharts/metallb --namespace metallb --create-namespace --wait
|
||||
fi
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/enterprise/clusterissuer" ]]; then
|
||||
helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/cloudnative-pg" ]]; then
|
||||
kubectl apply -f --server-side --force-conflicts https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml
|
||||
helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then
|
||||
kubectl apply -f --server-side --force-conflicts --server-side --force-conflicts https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml
|
||||
helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" # --upgrade
|
||||
|
||||
@@ -441,13 +466,17 @@ jobs:
|
||||
- name: Add Dependencies
|
||||
run: |
|
||||
if [[ "${{ matrix.chart }}" == "charts/operators/metallb-config" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml --server-side --force-conflicts || echo "error fetching metallb manifest"
|
||||
helm install metallb truecharts/metallb --namespace metallb --create-namespace --wait
|
||||
fi
|
||||
## TODO: Only add when required
|
||||
if [[ "${{ matrix.chart }}" == "charts/enterprise/clusterissuer" ]]; then
|
||||
helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/cloudnative-pg" ]]; then
|
||||
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest"
|
||||
helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
|
||||
fi
|
||||
if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then
|
||||
kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest"
|
||||
helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
|
||||
@@ -21,7 +21,7 @@ sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/enterprise/clusterissuer
|
||||
- https://cert-manager.io/
|
||||
type: application
|
||||
version: 4.0.0
|
||||
version: 4.0.1
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- core
|
||||
|
||||
Reference in New Issue
Block a user