-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try using action for postgres deployment
- Loading branch information
1 parent
bed2fad
commit b4dba04
Showing
2 changed files
with
78 additions
and
31 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,45 @@ | ||
name: "Deploy Postgres with Anti Affinity" | ||
inputs: | ||
release-name: | ||
required: true | ||
anti-affinity-value: | ||
required: true | ||
kube-config: | ||
required: true | ||
namespace: | ||
default: benchmarks | ||
anti-affinity-key: | ||
default: app.kubernetes.io/name | ||
|
||
|
||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: deploy postgres | ||
uses: vimeda/[email protected] | ||
with: | ||
release: ${{ inputs.release-name }} | ||
namespace: ${{ inputs.benchmarks }} | ||
chart: 'oci://registry-1.docker.io/bitnamicharts/postgresql' | ||
values: | | ||
global: | ||
postgresql: | ||
auth: | ||
username: postgres | ||
database: books-db | ||
primary: | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: ${{ inputs.anti-affinity-key}} | ||
operator: In | ||
values: | ||
- ${{ inputs.anti-affinity-value}} | ||
topologyKey: "kubernetes.io/hostname" | ||
env: | ||
KUBECONFIG_FILE: ${{ inputs.kube-config }} |
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 |
---|---|---|
|
@@ -52,36 +52,38 @@ jobs: | |
-Dquarkus.container-image.additional-tags=${{ github.sha }} \ | ||
-Dquarkus.container-image.username=${{ github.actor }} \ | ||
-Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }} | ||
- name: deploy postgres | ||
uses: vimeda/[email protected] | ||
- uses: ./.github/actions/k8s/deploy-postgres | ||
with: | ||
release: bookstore-quarkus-sync | ||
namespace: 'benchmarks' | ||
chart: 'oci://registry-1.docker.io/bitnamicharts/postgresql' | ||
token: '${{ secrets.GITHUB_TOKEN }}' | ||
values: | | ||
global: | ||
postgresql: | ||
auth: | ||
username: postgres | ||
database: books-db | ||
primary: | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app.kubernetes.io/name | ||
operator: In | ||
values: | ||
- bookstore-quarkus-sync | ||
- key: app.kubernetes.io/managed-by | ||
operator: In | ||
values: | ||
- quarkus | ||
topologyKey: "kubernetes.io/hostname" | ||
env: | ||
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}' | ||
release-name: bookstore-quarkus-sync | ||
anti-affinity-value: bookstore-quarkus-sync | ||
kube-config: ${{ secrets.KUBECONFIG }} | ||
|
||
|
||
# - name: deploy postgres | ||
# uses: vimeda/[email protected] | ||
# with: | ||
# release: bookstore-quarkus-sync | ||
# namespace: 'benchmarks' | ||
# chart: 'oci://registry-1.docker.io/bitnamicharts/postgresql' | ||
# token: '${{ secrets.GITHUB_TOKEN }}' | ||
# values: | | ||
# global: | ||
# postgresql: | ||
# auth: | ||
# username: postgres | ||
# database: books-db | ||
# | ||
# primary: | ||
# affinity: | ||
# podAntiAffinity: | ||
# requiredDuringSchedulingIgnoredDuringExecution: | ||
# - labelSelector: | ||
# matchExpressions: | ||
# - key: app.kubernetes.io/name | ||
# operator: In | ||
# values: | ||
# - bookstore-quarkus-sync | ||
# topologyKey: "kubernetes.io/hostname" | ||
# env: | ||
# KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}' |