-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create PG4K LTS chart as sub-chart of PG4K-PGD (#175)
As PG4K-PGD operator is well tested against PG4K operator with LTS release, we create a sub-chart under PG4K-PGD helm chart to install the PG4K LTS operator instead of using the `edb-postgres-for-kubernetes` chart as a dependency. We also create a global value repository which is used by both PG4K-PGD and PG4K LTS operators, to facilitate setting the target repository. Signed-off-by: Tao Li <[email protected]> Signed-off-by: YanniHu1996 <[email protected]> Signed-off-by: Niccolò Fei <[email protected]> Co-authored-by: YanniHu1996 <[email protected]> Co-authored-by: Niccolò Fei <[email protected]>
- Loading branch information
1 parent
7c668c5
commit 5caf78d
Showing
29 changed files
with
16,869 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Setup Kind | ||
description: Sets up a kind cluster and installs Helm and kubectl | ||
outputs: | ||
helm-path: | ||
description: The path to the Helm binary | ||
value: ${{ steps.helm.outputs.helm-path }} | ||
kubectl-path: | ||
description: The path to the kubectl binary | ||
value: ${{ steps.kubectl.outputs.kubectl-path }} | ||
runs: | ||
using: composite | ||
steps: | ||
- id: helm | ||
name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.16.2 | ||
|
||
- id: kubectl | ||
name: Install kubectl | ||
uses: azure/setup-kubectl@v4 | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ jobs: | |
outputs: | ||
pg4k-pgd-changed: ${{ steps.filter.outputs.pg4k-pgd-changed }} | ||
ep4k-changed: ${{ steps.filter.outputs.ep4k-changed }} | ||
ep4k-lts-changed: ${{ steps.filter.outputs.ep4k-lts-changed }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -26,6 +27,8 @@ jobs: | |
- 'charts/edb-postgres-distributed-for-kubernetes/**' | ||
ep4k-changed: | ||
- 'charts/edb-postgres-for-kubernetes/**' | ||
ep4k-lts-changed: | ||
- 'charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/**' | ||
deploy-ep4k: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -38,13 +41,8 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.11.3 | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
- name: Setup kind | ||
uses: ./.github/actions/setup-kind | ||
|
||
- name: Deploy using helm chart | ||
run: | | ||
|
@@ -54,8 +52,35 @@ jobs: | |
--set image.imageCredentials.password=${{ secrets.CS_PASSWORD }} \ | ||
--wait --timeout 10m | ||
- name: Install kubectl | ||
uses: azure/setup-kubectl@v4 | ||
- name: Deploy a cluster | ||
run: | | ||
kubectl apply -f hack/samples/ep4k-cluster.yaml | ||
PHASE="Cluster in healthy state" | ||
kubectl wait --timeout=5m --for=jsonpath='{.status.phase}'="$PHASE" clusters/cluster-example | ||
deploy-ep4k-subcharts: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- change-triage | ||
if: needs.change-triage.outputs.ep4k-lts-changed == 'true' | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup kind | ||
uses: ./.github/actions/setup-kind | ||
|
||
- name: Deploy using helm chart | ||
run: | | ||
helm upgrade --install edb-pg4k-lts --namespace postgresql-operator-system \ | ||
--create-namespace charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts \ | ||
--set image.imageCredentials.create=true \ | ||
--set image.imageCredentials.username=${{ secrets.CS_USER }} \ | ||
--set image.imageCredentials.password=${{ secrets.CS_PASSWORD }} \ | ||
--wait --timeout 10m | ||
- name: Deploy a cluster | ||
run: | | ||
|
@@ -75,35 +100,28 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.11.3 | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
- name: Setup kind | ||
uses: ./.github/actions/setup-kind | ||
|
||
- name: Deploy using helm chart | ||
run: | | ||
helm dependency build charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts | ||
helm dependency build charts/edb-postgres-distributed-for-kubernetes | ||
helm upgrade --install edb-pg4k-pgd --namespace pgd-operator-system \ | ||
--create-namespace charts/edb-postgres-distributed-for-kubernetes \ | ||
--set image.imageCredentials.username=${{ secrets.CS_USER }} \ | ||
--set image.imageCredentials.password=${{ secrets.CS_PASSWORD }} \ | ||
--wait --timeout 10m | ||
- name: Install kubectl | ||
uses: azure/setup-kubectl@v4 | ||
|
||
- name: Deploy a cluster | ||
run: | | ||
kubectl apply -f hack/samples/issuer-selfsigned.yaml | ||
kubectl apply -f hack/samples/pg4k-pgd-cluster.yaml | ||
PHASE="PGDGroup - Healthy" | ||
kubectl wait --timeout=5m --for=jsonpath='{.status.phase}'="$PHASE" pgdgroups/region-a | ||
kubectl wait --timeout=5m --for=jsonpath='{.status.phase}'="$PHASE" pgdgroups/region-b | ||
kubectl wait --timeout=5m --for=jsonpath='{.status.phase}'="$PHASE" pgdgroups/region-c | ||
kubectl wait --timeout=8m --for=jsonpath='{.status.phase}'="$PHASE" pgdgroups/region-a | ||
kubectl wait --timeout=8m --for=jsonpath='{.status.phase}'="$PHASE" pgdgroups/region-b | ||
kubectl wait --timeout=8m --for=jsonpath='{.status.phase}'="$PHASE" pgdgroups/region-c | ||
deploy-ep4k-single-namespace: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -116,13 +134,8 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.11.3 | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
- name: Setup kind | ||
uses: ./.github/actions/setup-kind | ||
|
||
- name: Deploy in single-namespace mode using helm chart | ||
run: | | ||
|
@@ -133,8 +146,42 @@ jobs: | |
--set image.imageCredentials.password=${{ secrets.CS_PASSWORD }} \ | ||
--wait --timeout 10m | ||
- name: Install kubectl | ||
uses: azure/setup-kubectl@v4 | ||
- name: Deploy a cluster in the watched namespace | ||
run: | | ||
kubectl -n single-install apply -f hack/samples/ep4k-cluster.yaml | ||
PHASE="Cluster in healthy state" | ||
kubectl -n single-install wait --timeout=5m --for=jsonpath='{.status.phase}'="$PHASE" clusters/cluster-example | ||
- name: Ignore deploying a cluster in another namespace | ||
run: | | ||
kubectl create ns test-ignore | ||
kubectl -n test-ignore apply -f hack/samples/ep4k-cluster.yaml | ||
kubectl -n test-ignore get pods 2>&1 >/dev/null | grep 'No resources found' | ||
deploy-ep4k-subcharts-single-namespace: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- change-triage | ||
if: needs.change-triage.outputs.ep4k-lts-changed == 'true' | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup kind | ||
uses: ./.github/actions/setup-kind | ||
|
||
- name: Deploy in single-namespace mode using helm chart use different namespace | ||
run: | | ||
helm upgrade --install edb-pg4k-lts --namespace single-install \ | ||
--set config.clusterWide=false \ | ||
--create-namespace charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts \ | ||
--set image.repository=docker.enterprisedb.com/k8s_standard_pgd \ | ||
--set image.imageCredentials.create=true \ | ||
--set image.imageCredentials.username=${{ secrets.CS_USER }} \ | ||
--set image.imageCredentials.password=${{ secrets.CS_PASSWORD }} \ | ||
--wait --timeout 10m | ||
- name: Deploy a cluster in the watched namespace | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
*~ | ||
|
||
# Charts Dependency files | ||
/charts/*/charts/ | ||
/charts/*/charts/*.tgz | ||
/charts/*/Chart.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.