Skip to content

Commit bd80229

Browse files
feat(internal-gateway): add internal-gateway chart (#28)
1 parent 8523487 commit bd80229

File tree

21 files changed

+606
-0
lines changed

21 files changed

+606
-0
lines changed

.github/workflows/lint-test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ jobs:
102102
# Do not run `ct install` for cf-common (library chart)
103103
exit 0
104104
fi
105+
helm repo add cf-common https://chartmuseum.codefresh.io/cf-common
105106
ct install --config "ct.yaml"
106107
107108
unittest-charts:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/internal-gateway/Chart.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v2
2+
appVersion: v0.0.0
3+
description: A Helm chart for Codefresh Internal Gateway
4+
name: internal-gateway
5+
version: 0.1.0
6+
home: https://github.com/codefresh-io/helm-charts
7+
keywords:
8+
- codefresh
9+
- gateway
10+
maintainers:
11+
- name: codefresh
12+
url: https://codefresh-io.github.io/
13+
dependencies:
14+
- name: cf-common
15+
repository: https://chartmuseum.codefresh.io/cf-common
16+
version: "0.6.0"

charts/internal-gateway/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# internal-gateway
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: v0.0.0](https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square)
4+
5+
A Helm chart for Codefresh Internal Gateway
6+
7+
**Homepage:** <https://github.com/codefresh-io/helm-charts>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| codefresh | | <https://codefresh-io.github.io/> |
14+
15+
## Requirements
16+
17+
| Repository | Name | Version |
18+
|------------|------|---------|
19+
| https://chartmuseum.codefresh.io/cf-common | cf-common | 0.6.0 |
20+
21+
## Values
22+
23+
| Key | Type | Default | Description |
24+
|-----|------|---------|-------------|
25+
| codefresh | object | See below | Codefresh platform settings |
26+
| configMaps | object | See below | Configmap parameters |
27+
| container | object | See below | Main container parameters |
28+
| containerSecurityContext | object | See below | Container security context parameters |
29+
| controller | object | See below | Controller parameters |
30+
| global | object | See below | Global parameters |
31+
| global.clusterDomain | string | `"cluster.local"` | configures cluster domain ("cluster.local" by default) |
32+
| global.dnsNamespace | string | `"kube-system"` | configures DNS service namespace |
33+
| global.dnsService | string | `"kube-dns"` | configures DNS service name |
34+
| hpa | object | See below | HPA parameters |
35+
| ingress | object | See below | Ingress parameters |
36+
| libraryMode | bool | `false` | |
37+
| nginx.config.accessLogEnabled | bool | `true` | Enables NGINX access logs |
38+
| nginx.config.errorLogLevel | string | `"error"` | Sets the log level of the NGINX error log. One of `debug`, `info`, `notice`, `warn`, `error`, `crit`, `alert`, or `emerg` |
39+
| nginx.config.file | string | See below | Config file contents for Nginx. Passed through the `tpl` function to allow templating. |
40+
| nginx.config.httpSnippet | string | `""` | Allows appending custom configuration to the http block |
41+
| nginx.config.logFormat | string | `"main '$remote_addr - $remote_user [$time_local] $status '\n '\"$request\" $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';"` | NGINX log format |
42+
| nginx.config.proxyConf | object | `{"client_body_buffer_size":"16k","client_max_body_size":"5M","proxy_buffer_size":"64k","proxy_buffers":"4 64k","proxy_connect_timeout":"5s","proxy_read_timeout":"60s","proxy_send_timeout":"60s"}` | Set proxy parameters Ref: https://nginx.org/en/docs/http/ngx_http_proxy_module.html |
43+
| nginx.config.resolver | string | `nil` | Allows to set a custom resolver |
44+
| nginx.config.serverSnippet | string | `""` | Allows appending custom configuration to the server block |
45+
| nginx.config.verboseLogging | bool | `true` | Enable logging of 2xx and 3xx HTTP requests |
46+
| pdb | object | See below | PDB parameters |
47+
| podAnnotations | object | See below | Pod annotations |
48+
| podSecurityContext | object | See below | Pod Security Context parameters |
49+
| rbac | object | See below | RBAC parameters |
50+
| service | object | See below | Service parameters |
51+
| serviceAccount | object | See below | Service Account parameters |
52+
| topologySpreadConstraints | string | See below | Topologe Spread Constraints parameters |
53+
| volumes | object | See below | Volumes parameters |
54+
55+
----------------------------------------------
56+
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "internal-gateway.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "internal-gateway.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "internal-gateway.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "internal-gateway.labels" -}}
37+
helm.sh/chart: {{ include "internal-gateway.chart" . }}
38+
{{ include "internal-gateway.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "internal-gateway.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "internal-gateway.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "internal-gateway.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "internal-gateway.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- define "internal-gateway.configmap" -}}
2+
3+
{{ $templateName := printf "cf-common-%s.configmaps" (index .Subcharts "cf-common").Chart.Version }}
4+
{{- include $templateName . }}
5+
6+
{{- end -}}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- define "internal-gateway.deployment" -}}
2+
3+
{{ $templateName := printf "cf-common-%s.controller" (index .Subcharts "cf-common").Chart.Version }}
4+
{{- include $templateName . }}
5+
6+
{{- end -}}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- define "internal-gateway.hpa" -}}
2+
3+
{{ $templateName := printf "cf-common-%s.hpa" (index .Subcharts "cf-common").Chart.Version }}
4+
{{- include $templateName . }}
5+
6+
{{- end -}}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- define "internal-gateway.ingress" -}}
2+
3+
{{ $templateName := printf "cf-common-%s.ingress" (index .Subcharts "cf-common").Chart.Version }}
4+
{{- include $templateName . }}
5+
6+
{{- end -}}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- define "internal-gateway.pdb" -}}
2+
3+
{{ $templateName := printf "cf-common-%s.pdb" (index .Subcharts "cf-common").Chart.Version }}
4+
{{- include $templateName . }}
5+
6+
{{- end -}}

0 commit comments

Comments
 (0)