-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional ingress support for helm chart (#11534)
* Create empty ingress for helm chart * Add helm chart testing config and yaml lint config * Exclude files generated during chart testing * Bump version and fix apiVersion * Support optional ingress on helm chart * Rename workflow * Create GHA workflow to lint helm charts * Add explicit URL to mockserver Helm repository * Include self in the paths filter * Render out annotations in key/value format * Spec out all 6 nodes in values for ingress hosts * Hardcode standard ingress values * Change annotations data type * Use different values for ingress annotations and hardcode others
- Loading branch information
Showing
8 changed files
with
222 additions
and
4 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,5 @@ | ||
# See: https://github.com/helm/chart-testing | ||
target-branch: develop | ||
chart-dirs: 'charts' | ||
check-version-increment: false | ||
validate-maintainers: false |
File renamed without changes.
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,25 @@ | ||
name: Helm Chart | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "charts/**" | ||
- ".github/workflows/helm-chart.yml" | ||
|
||
jobs: | ||
ci-lint-helm-charts: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
actions: read | ||
steps: | ||
- name: ci-lint-helm-charts | ||
uses: smartcontractkit/.github/actions/ci-lint-charts@9fd15fe8e698a5e28bfd06b3a91471c56568dcb3 # ci-lint-charts@0.1.1 | ||
with: | ||
# chart testing inputs | ||
chart-testing-extra-args: "--lint-conf=lintconf.yaml" | ||
# grafana inputs | ||
metrics-job-name: ci-lint-helm-charts | ||
gc-basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} | ||
gc-host: ${{ secrets.GRAFANA_CLOUD_HOST }} |
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,3 @@ | ||
# Helm | ||
charts/ | ||
requirements.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
apiVersion: v1 | ||
apiVersion: v2 | ||
name: chainlink-cluster | ||
description: Chainlink nodes cluster | ||
version: 0.1.3 | ||
version: 0.2.0 | ||
appVersion: "2.6.0" | ||
dependencies: | ||
- name: mockserver | ||
version: "5.14.0" | ||
repository: "@mockserver" | ||
condition: mockserver.enabled | ||
repository: "https://www.mock-server.com" | ||
condition: mockserver.enabled |
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,42 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $.Release.Name }} | ||
labels: | ||
app: {{ $.Release.Name }} | ||
release: {{ $.Release.Name }} | ||
{{- range $key, $value := $.Values.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
annotations: | ||
alb.ingress.kubernetes.io/backend-protocol: HTTP | ||
alb.ingress.kubernetes.io/certificate-arn: {{ $.Values.ingress.annotation_certificate_arn | quote }} | ||
alb.ingress.kubernetes.io/group.name: {{ $.Values.ingress.annotation_group_name | quote }} | ||
alb.ingress.kubernetes.io/scheme: internal | ||
alb.ingress.kubernetes.io/target-type: ip | ||
{{- if .Values.ingress.extra_annotations }} | ||
{{- range $key, $value := .Values.ingress.extra_annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.ingress.ingressClassName }} | ||
ingressClassName: {{ . }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ .host }} | ||
http: | ||
paths: | ||
{{- range .http.paths }} | ||
- path: / | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: {{ .backend.service.name }} | ||
port: | ||
number: {{ .backend.service.port.number }} | ||
{{- end }} | ||
{{- end }} | ||
{{- 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
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,46 @@ | ||
--- | ||
# Copied from: | ||
# https://redhat-cop.github.io/ci/linting-testing-helm-charts.html | ||
# with `min-spaces-from-content` changed to be compatible with prettier. | ||
rules: | ||
braces: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
commas: | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
comments: | ||
require-starting-space: true | ||
min-spaces-from-content: 1 | ||
document-end: disable | ||
document-start: disable # No --- to start a file | ||
empty-lines: | ||
max: 2 | ||
max-start: 0 | ||
max-end: 0 | ||
hyphens: | ||
max-spaces-after: 1 | ||
indentation: | ||
spaces: consistent | ||
indent-sequences: whatever # - list indentation will handle both indentation and without | ||
check-multi-line-strings: false | ||
key-duplicates: enable | ||
line-length: disable # Lines can be any length | ||
new-line-at-end-of-file: disable | ||
new-lines: | ||
type: unix | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning | ||
|