Skip to content

Add workflow to validate deployment methods #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/validate-deployments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Validate Deployment methods

on:
push:
branches:
- master
paths:
- "charts/ext-postgres-operator/**"
- "config/**"
pull_request:
branches:
- master
paths:
- "charts/ext-postgres-operator/**"
- "config/**"

jobs:
validate-helm:
name: Validate Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: "latest"

- name: Lint Helm chart
run: helm lint ./charts/ext-postgres-operator

- name: Template Helm chart
run: helm template ext-postgres-operator ./charts/ext-postgres-operator > /dev/null

validate-kustomize:
name: Validate Kustomize Configuration
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate Kustomize configuration
run: kustomize build ./config/default > /dev/null
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,9 @@ data:

To install the operator using Kustomize, follow these steps:

1. Configure Postgres credentials for the operator in `config/secret.yaml`.
1. Configure Postgres credentials for the operator in `config/default/secret.yaml`.

2. Create the namespace if needed:
```bash
kubectl apply -f config/namespace.yaml
```

3. Apply the secret:
```bash
kubectl apply -f deploy/secret.yaml
```

4. Deploy the operator:
2. Deploy the operator:
```bash
kubectl kustomize config/default/ | kubectl apply -f -
```
Expand Down
1 change: 1 addition & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace: operators

resources:
- namespace.yaml
- secret.yaml
- ../crd
- ../rbac
- ../manager
4 changes: 2 additions & 2 deletions config/secret.yaml → config/default/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: ext-postgres-operator
type: Opaque
data:
POSTGRES_HOST: cG9zdGdyZXMuZGF0YWJhc2Vz
POSTGRES_HOST: cG9zdGdyZXNxbA==
POSTGRES_USER: cG9zdGdyZXM=
POSTGRES_PASS: YWRtaW4xMjM=
POSTGRES_PASS: cG9zdGdyZXM=
POSTGRES_URI_ARGS: c3NsbW9kZT1kaXNhYmxl
Loading