-
Notifications
You must be signed in to change notification settings - Fork 0
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 #18 from foomo/gateway-crds
feat(gateway-crds): add chart
- Loading branch information
Showing
9 changed files
with
241 additions
and
1 deletion.
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
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,18 @@ | ||
apiVersion: v2 | ||
type: application | ||
name: gateway-crds | ||
description: Foomo Gateway Custom Resource Definition Chart | ||
icon: https://avatars.githubusercontent.com/u/889755?s=200&v=4 | ||
home: https://www.foomo.org | ||
keywords: | ||
- foomo | ||
- gateway | ||
sources: | ||
- https://github.com/foomo/helm-charts | ||
annotations: | ||
"artifacthub.io/links": | | ||
- name: Chart Source | ||
url: https://github.com/foomo/helm-charts | ||
version: 0.1.0 | ||
appVersion: 0.1.0 |
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,21 @@ | ||
# gateway-crds | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) | ||
|
||
Foomo Gateway Custom Resource Definition Chart | ||
|
||
**Homepage:** <https://www.foomo.org> | ||
|
||
## Source Code | ||
|
||
* <https://github.com/foomo/helm-charts> | ||
|
||
## Values | ||
|
||
### Overrides | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| fullnameOverride | string | `""` | Overrides the chart's computed fullname | | ||
| nameOverride | string | `""` | Overrides the chart's name | | ||
| namespaceOverride | string | `""` | The name of the Namespace to deploy If not set, `.Release.Namespace` is used | |
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,16 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.badgesSection" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ template "chart.maintainersSection" . }} | ||
|
||
{{ template "chart.sourcesSection" . }} | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
{{ template "chart.valuesSection" . }} |
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,58 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "gateway.crds.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- 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). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "gateway.crds.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "gateway.crds.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "gateway.crds.labels" -}} | ||
helm.sh/chart: {{ include "gateway.crds.chart" . }} | ||
{{ include "gateway.crds.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "gateway.crds.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "gateway.crds.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the namespace | ||
*/}} | ||
{{- define "gateway.crds.namespace" -}} | ||
{{- default .Release.Namespace .Values.namespaceOverride }} | ||
{{- 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,79 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
# name must match the spec fields below, and be in the form: <plural>.<group> | ||
name: gateways.foomo.org | ||
labels: | ||
{{- include "gateway.crds.labels" . | nindent 4 }} | ||
spec: | ||
# group name to use for REST API: /apis/<group>/<version> | ||
group: foomo.org | ||
# list of versions supported by this CustomResourceDefinition | ||
versions: | ||
- name: v1 | ||
# Each version can be enabled/disabled by Served flag. | ||
served: true | ||
# One and only one version must be marked as the storage version. | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
service: | ||
type: string | ||
minLength: 1 | ||
description: k8s service to connect to | ||
sitemap: | ||
type: string | ||
addToRobots: | ||
type: string | ||
expose: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
stripBasePath: | ||
type: boolean | ||
description: service is exposed at /foo request is /foo/bar, stripBasePath == true => requests will go to /bar and /foo will be set as x-base-path header | ||
description: | ||
type: string | ||
description: a description of the exposition, to be show in gateway api | ||
cmsApp: | ||
type: string | ||
description: named application in cms | ||
paths: | ||
type: array | ||
minItems: 0 | ||
description: 'paths in urls to register for, lookup is automatically long to short' | ||
items: | ||
type: string | ||
cmsMimetypes: | ||
type: array | ||
minItems: 0 | ||
description: contentserver mimetypes | ||
items: | ||
type: string | ||
internalAccessGroups: | ||
type: array | ||
minItems: 0 | ||
description: access is only granted to these internal groups | ||
items: | ||
type: string | ||
required: | ||
- service | ||
|
||
# either Namespaced or Cluster | ||
scope: Namespaced | ||
names: | ||
# plural name to be used in the URL: /apis/<group>/<version>/<plural> | ||
plural: gateways | ||
# singular name to be used as an alias on the CLI and for display | ||
singular: gateway | ||
# kind is normally the CamelCased singular type. Your resource manifests use this. | ||
kind: Gateway | ||
# shortNames allow shorter string to match your resource on the CLI | ||
shortNames: | ||
- gw |
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 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"type": "object", | ||
"properties": { | ||
"fullnameOverride": { | ||
"type": "string" | ||
}, | ||
"nameOverride": { | ||
"type": "string" | ||
}, | ||
"namespaceOverride": { | ||
"type": "string" | ||
} | ||
} | ||
} |
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,10 @@ | ||
# -- Overrides the chart's name | ||
# @section -- Overrides | ||
nameOverride: "" | ||
# -- Overrides the chart's computed fullname | ||
# @section -- Overrides | ||
fullnameOverride: "" | ||
# -- The name of the Namespace to deploy | ||
# If not set, `.Release.Namespace` is used | ||
# @section -- Overrides | ||
namespaceOverride: '' |