-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from xwiki-contrib/dev-v1
HELM-19 Upgrade Definitions (Helm, Kubernetes) and Dependencies (Database)
- Loading branch information
Showing
45 changed files
with
1,050 additions
and
605 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,77 @@ | ||
name: Releases | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev-v1 | ||
paths: | ||
- '.github/**' | ||
- 'charts/**' | ||
- '!**.md' | ||
|
||
jobs: | ||
|
||
validate: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
result: ${{ steps.changed.outputs.result }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- id: changed | ||
name: Changed | ||
run: | | ||
files_changed="$(git show --pretty="" --name-only)" | ||
echo "$files_changed" | ||
num_version_bumps="$(echo "$files_changed" | grep Chart.yaml | xargs git show | grep -c "+version" || true)" | ||
if [[ "$num_version_bumps" -eq "1" ]]; then | ||
echo "result=ok" >> $GITHUB_OUTPUT | ||
else | ||
echo "result=skip" | ||
echo "::warning::Version not changed, skipping release job..." | ||
fi | ||
- name: Tests | ||
if: ${{ steps.changed.outputs.result == 'ok' }} | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm plugin install https://github.com/helm-unittest/helm-unittest | ||
for FILE in charts/*; do | ||
helm dependency update $FILE | ||
helm unittest $FILE | ||
done | ||
release: | ||
needs: validate | ||
if: ${{ needs.validate.outputs.result == 'ok' }} | ||
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions | ||
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Add repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm plugin install https://github.com/helm-unittest/helm-unittest | ||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@v1.5.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
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,32 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/**' | ||
- 'charts/**' | ||
- '!**.md' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Add repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm plugin install https://github.com/helm-unittest/helm-unittest | ||
- name: Run unit tests | ||
run: | | ||
for FILE in charts/*; do | ||
helm dependency update $FILE | ||
helm unittest $FILE | ||
done |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
.DS_STORE | ||
charts/ | ||
charts/*/charts |
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ | |
.project | ||
.idea/ | ||
*.tmproj | ||
tests/ | ||
charts/*/tests/ |
This file was deleted.
Oops, something went wrong.
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
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,15 @@ | ||
dependencies: | ||
- name: common | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 2.2.2 | ||
- name: mysql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 9.4.8 | ||
- name: mariadb | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 11.4.5 | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 12.1.13 | ||
digest: sha256:eed001db0c159eb0e99d9c5c22ec579a79fe4d80c5d6ed2418f5d0472a08d9d0 | ||
generated: "2023-02-02T10:11:09.3444207-03:00" |
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,35 @@ | ||
apiVersion: v2 | ||
description: XWiki is a free wiki software platform written in Java with a design emphasis on extensibility. XWiki is an enterprise wiki. It includes WYSIWYG editing, OpenDocument based document import/export, semantic annotations and tagging, and advanced permissions management. | ||
name: xwiki | ||
version: 1.0.0-Beta.3 | ||
type: application | ||
keywords: | ||
- xwiki | ||
home: http://xwiki.org | ||
icon: https://www.xwiki.org/xwiki/bin/download/Main/Logo/logo-x.png | ||
sources: | ||
- https://github.com/xwiki-contrib/docker-xwiki | ||
maintainers: | ||
- name: Ashish Sharma | ||
email: sharma.ashish960@gmail.com | ||
- name: Ludovic Dubost | ||
email: ludovic@xwiki.com | ||
- name: Guilherme Sautner | ||
email: guilherme.sautner@xwiki.com | ||
dependencies: | ||
- name: "common" | ||
repository: "https://charts.bitnami.com/bitnami" | ||
version: "2.2.2" | ||
- name: mysql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 9.4.8 | ||
condition: mysql.enabled | ||
- name: mariadb | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 11.4.5 | ||
condition: mariadb.enabled | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 12.1.13 | ||
condition: postgresql.enabled | ||
|
6 changes: 3 additions & 3 deletions
6
templates/NOTES.txt → charts/xwiki/templates/NOTES.txt
100755 → 100644
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
|
||
{{- if contains "NodePort" .Values.service.type }} | ||
Get the application URL by running these commands: | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "xwiki.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT/xwiki/ | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
Get the application URL by running these commands: | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
You can watch the status of by running 'kubectl get svc -w {{ template "xwiki.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "xwiki.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.service.externalPort }} | ||
{{- end }} |
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,47 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "xwiki.name" -}} | ||
{{- include "common.names.name" . }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "xwiki.fullname" -}} | ||
{{- include "common.names.fullname" . }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "xwiki.labels" -}} | ||
{{- include "common.labels.standard" . }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "xwiki.selectorLabels" -}} | ||
{{- include "common.labels.matchLabels" . }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "xwiki.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "xwiki.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of init scripts configmap | ||
*/}} | ||
{{- define "xwiki.initScripts" -}} | ||
{{- printf "%s-init-scripts" (include "xwiki.fullname" .) }} | ||
{{- end }} |
22 changes: 12 additions & 10 deletions
22
templates/configmaps.yaml → charts/xwiki/templates/configmaps.yaml
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
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.