Skip to content
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

chore: custom ingress annotations #3

Merged
merged 6 commits into from
Jun 14, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/chart-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
flatBranchName=$(echo "${{ github.ref_name}}" | sed 's/\//\-/g')
sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml
sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml
sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml
# sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml

helm package --sign --key "Plane" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts
cp charts/${{env.CHART_REPO}}/README.md ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/${{env.CHART_REPO}}.md
Expand All @@ -87,7 +87,7 @@ jobs:
flatBranchName=$(echo "${{ github.ref_name}}" | sed 's/\//\-/g')
sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml
sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml
sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml
# sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml

helm package --sign --key "Plane" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts
cp charts/${{env.CHART_REPO}}/README.md ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/${{env.CHART_REPO}}.md
Expand Down
4 changes: 2 additions & 2 deletions charts/plane-ce/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Meet Plane. An open-source software development tool to manage issu

type: application

version: 1.0.18
appVersion: "0.20.0"
version: 1.0.19
appVersion: "0.21.0"

home: https://plane.so
icon: https://plane.so/favicon/favicon-32x32.png
Expand Down
7 changes: 1 addition & 6 deletions charts/plane-ce/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ questions:
default: true
required: true
group: "Ingress"
show_subquestion_if: true
subquestions:
- variable: ingress.appHost
label: "App. Host"
Expand All @@ -307,11 +306,7 @@ questions:
type: string
required: true
default: "nginx"
- variable: ingress.clientMaxBodySize
label: "Max Body Size"
type: string
required: true
default: "10m"
show_if: "ingress.enabled=true"

- variable: ssl.createIssuer
label: "Create Issuer"
Expand Down
6 changes: 3 additions & 3 deletions charts/plane-ce/templates/config-secrets/app-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ data:
DOCKERIZED: "1"
GUNICORN_WORKERS: {{ .Values.env.gunicorn_api_workers | default 1 | quote }}

{{- if and .Values.ingress.enabled .Values.ingress.appHost }}
{{- if .Values.ingress.appHost }}
WEB_URL: "http://{{ .Values.ingress.appHost }}"
{{- else }}
WEB_URL: ""
Expand All @@ -30,11 +30,11 @@ data:

{{- if eq .Values.env.cors_allowed_origins "*"}}
CORS_ALLOWED_ORIGINS: "*"
{{- else if and .Values.ingress.enabled .Values.ingress.appHost .Values.env.cors_allowed_origins }}
{{- else if and .Values.ingress.appHost .Values.env.cors_allowed_origins }}
CORS_ALLOWED_ORIGINS: "http://{{ .Values.ingress.appHost }},https://{{ .Values.ingress.appHost }},{{ .Values.env.cors_allowed_origins }}"
{{- else if .Values.env.cors_allowed_origins }}
CORS_ALLOWED_ORIGINS: "{{ .Values.env.cors_allowed_origins }}"
{{- else if and .Values.ingress.enabled .Values.ingress.appHost}}
{{- else if .Values.ingress.appHost}}
CORS_ALLOWED_ORIGINS: "http://{{ .Values.ingress.appHost }},https://{{ .Values.ingress.appHost }}"
{{- else }}
CORS_ALLOWED_ORIGINS: ""
Expand Down
6 changes: 5 additions & 1 deletion charts/plane-ce/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ kind: Ingress
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-ingress
{{- if gt (len .Values.ingress.ingress_annotations) 0 }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.ingress.clientMaxBodySize | default "5m" | quote}}
{{- range $key, $value := .Values.ingress.ingress_annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClass }}
rules:
Expand Down
4 changes: 3 additions & 1 deletion charts/plane-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ ingress:
appHost: 'plane.example.com'
minioHost: 'plane-minio.example.com'
ingressClass: 'nginx'
clientMaxBodySize: 10m
ingress_annotations: {
"nginx.ingress.kubernetes.io/proxy-body-size": "5m",
}

# SSL Configuration - Valid only if ingress.enabled is true
ssl:
Expand Down
2 changes: 1 addition & 1 deletion charts/plane-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Meet Plane. An Enterprise software development tool to manage issue

type: application

version: 1.0.5
version: 1.0.6
appVersion: "1.0.0"

home: https://plane.so/
Expand Down
21 changes: 12 additions & 9 deletions charts/plane-enterprise/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,29 +284,32 @@ questions:
type: string
default: "5242880"

- variable: ingress.ingressClass
label: "Ingress Classname"
type: string
- variable: ingress.enabled
label: "Enable Ingress"
type: boolean
required: true
default: "nginx"
default: true
group: "Ingress"
# show_subquestion_if: true
subquestions:
- variable: ingress.clientMaxBodySize
label: "Max Body Size"
type: string
required: true
default: "10m"
- variable: ingress.minioHost
label: "Minio Host"
type: string
default: "plane-minio.example.com"
show_if: "services.minio.local_setup=true"
- variable: ingress.ingressClass
label: "Ingress Classname"
type: string
required: true
default: "nginx"
show_if: "ingress.enabled=true"

- variable: ssl.createIssuer
label: "Create Issuer"
type: boolean
default: false
group: "Ingress"
show_if: "ingress.enabled=true"
show_subquestion_if: true
subquestions:
- variable: ssl.issuer
Expand Down
6 changes: 5 additions & 1 deletion charts/plane-enterprise/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ kind: Ingress
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-ingress
{{- if gt (len .Values.ingress.ingress_annotations) 0 }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.ingress.clientMaxBodySize | default "5m" | quote}}
{{- range $key, $value := .Values.ingress.ingress_annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClass }}
rules:
Expand Down
4 changes: 3 additions & 1 deletion charts/plane-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ ingress:
enabled: true
minioHost: ''
ingressClass: 'nginx'
clientMaxBodySize: 10m
ingress_annotations: {
"nginx.ingress.kubernetes.io/proxy-body-size": "5m",
}

ssl:
createIssuer: false
Expand Down