Skip to content

Commit

Permalink
Merge pull request #30 from foomo/squadron-charts
Browse files Browse the repository at this point in the history
feat: update
  • Loading branch information
franklinkim authored Oct 27, 2024
2 parents 8794083 + eb30bf6 commit b2f39f4
Show file tree
Hide file tree
Showing 30 changed files with 1,250 additions and 501 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
.PHONY: check
## Lint, Schema & docs
check: lint schema docs
@echo "done"
@echo "✓ lint"
@echo "✓ schema"
@echo "✓ docs"

.PHONY: lint
## Lint Helm charts
Expand All @@ -31,11 +33,10 @@ docs:
## https://github.com/knechtionscoding/helm-schema-gen
schema: PWD=$(pwd)
schema:
#helm-schema -n -c charts/namespace
helm-schema -n -c charts/namespace
helm-schema -n -c charts/squadron-keel-server
helm-schema -n -c charts/squadron-keel-cronjob
helm-schema -n -c charts/squadron-nextjs-server
helm schema-gen charts/namespace/values.yaml > charts/namespace/values.schema.json
helm schema-gen charts/beam/values.yaml > charts/beam/values.schema.json
helm schema-gen charts/contentserver/values.yaml > charts/contentserver/values.schema.json
helm schema-gen charts/csp-reporter/values.yaml > charts/csp-reporter/values.schema.json
Expand Down
4 changes: 2 additions & 2 deletions charts/namespace/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ annotations:
- name: Chart Source
url: https://github.com/foomo/helm-charts
version: 0.1.2
appVersion: 0.1.2
version: 0.2.0
appVersion: 0.2.0
22 changes: 11 additions & 11 deletions charts/namespace/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# namespace

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.0](https://img.shields.io/badge/AppVersion-0.2.0-informational?style=flat-square)

Common Namespace Resource Chart

Expand All @@ -12,20 +12,20 @@ Common Namespace Resource Chart

## Values

### Overrides
### General

| 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 |
| dockerSecrets | object | `{}` | Docker config json secrets |
| secrets | object | `{}` | Opaque secrets |
| serviceAccounts | object | `{}` | Service accounts settings |
| tlsSecrets | object | `{}` | TLS secrets |
| volumes | object | `{}` | Service accounts settings |

### Other Values
### Overrides

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| secrets | object | `{"dockerConfigs":{},"opaque":{},"tls":{}}` | Namspace secrets |
| secrets.dockerConfigs | object | `{}` | Docker config json secrets |
| secrets.opaque | object | `{}` | Opaque secrets |
| secrets.tls | object | `{}` | TLS secrets |
| serviceAccounts | object | `{}` | Namspace serviceaccounts |
| fullnameOverride | string | `""` | Overrides the chart's computed fullname |
| nameOverride | string | `""` | Overrides the chart's name |
| namespaceOverride | string | `""` | The name of the Namespace to deploy |
25 changes: 25 additions & 0 deletions charts/namespace/templates/persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- range $key, $value := .Values.volumes }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ $key }}
labels: {{- include "namespace.labels" $ | nindent 4 }}
{{- with $value.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{-end }}
namespace: {{ include "namespace.namespace" $ }}
spec:
{{- if $value.name }}
volumeName: {{ $value.name }}
{{- end }}
accessModes: [ {{ default $value.accessMode "ReadWriteOnce" }} ]
{{- with $value.storageClass }}
storageClassName: {{ . }}
{{- end }}
{{- with $value.size }}
resources:
requests:
storage: {{ . }}
{{- end }}
---
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ metadata:
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "namespace.namespace" $ }}
data: {{- toYaml $value.data | nindent 2 }}
{{- with $value.data }}
data: {{- toYaml . | nindent 2 }}
{{- end }}
{{- with $value.stringData }}
stringData: {{- toYaml . | nindent 2 }}
{{- end }}
---
{{- end }}
145 changes: 120 additions & 25 deletions charts/namespace/values.schema.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,127 @@
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"fullnameOverride": {
"type": "string"
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"dockerSecrets": {
"additionalProperties": {
"properties": {
"annotations": {
"additionalProperties": true,
"type": "object"
},
"data": {
"additionalProperties": true,
"type": "object"
}
},
"nameOverride": {
"type": "string"
"type": "object"
},
"description": "tlsSecrets:\n my-domain.com:\n annotations:\n replicator.v1.mittwald.de/replicate-to: \".*\"\n data:\n tls.crt: ''\n tls.key: ''\nDocker config json secrets",
"required": [],
"title": "dockerSecrets",
"type": "object"
},
"fullnameOverride": {
"default": "",
"description": "Overrides the chart's computed fullname",
"required": [],
"title": "fullnameOverride",
"type": "string"
},
"global": {
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
"required": [],
"title": "global",
"type": "object"
},
"nameOverride": {
"default": "",
"description": "Overrides the chart's name",
"required": [],
"title": "nameOverride",
"type": "string"
},
"namespaceOverride": {
"default": "",
"description": "The name of the Namespace to deploy",
"required": [],
"title": "namespaceOverride",
"type": "string"
},
"secrets": {
"additionalProperties": {
"properties": {
"annotations": {
"additionalProperties": true,
"type": "object"
},
"data": {
"additionalProperties": true,
"type": "object"
},
"stringData": {
"additionalProperties": true,
"type": "object"
}
},
"namespaceOverride": {
"type": "string"
"type": "object"
},
"description": "Opaque secrets",
"required": [],
"title": "secrets",
"type": "object"
},
"serviceAccounts": {
"additionalProperties": {
"properties": {
"annotations": {
"additionalProperties": true,
"type": "object"
}
},
"secrets": {
"type": "object",
"properties": {
"dockerConfigs": {
"type": "object"
},
"opaque": {
"type": "object"
},
"tls": {
"type": "object"
}
}
"type": "object"
},
"description": "Service accounts settings",
"required": [],
"title": "serviceAccounts",
"type": "object"
},
"tlsSecrets": {
"additionalProperties": {
"properties": {
"annotations": {
"additionalProperties": true,
"type": "object"
},
"data": {
"additionalProperties": true,
"type": "object"
}
},
"serviceAccounts": {
"type": "object"
},
"description": "secrets:\n my-secret:\n annotations:\n replicator.v1.mittwald.de/replicate-to: \".*\"\n data: {}\nTLS secrets",
"required": [],
"title": "tlsSecrets",
"type": "object"
},
"volumes": {
"additionalProperties": {
"additionalProperties": true,
"properties": {
"annotations": {
"additionalProperties": true,
"type": "object"
}
}
},
"type": "object"
},
"description": "Service accounts settings",
"required": [],
"title": "volumes",
"type": "object"
}
}
},
"required": [],
"type": "object"
}
Loading

0 comments on commit b2f39f4

Please sign in to comment.