This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
-
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 #15 from onmetal/kube_api
Added etcd helm chart and improved druid chart configuration
- Loading branch information
Showing
33 changed files
with
658 additions
and
16 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
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 |
---|---|---|
|
@@ -21,3 +21,4 @@ | |
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
README.md.gotmpl |
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,27 @@ | ||
# etcd-druid | ||
|
||
![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.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square) | ||
|
||
Helm chart for etcd-druid. | ||
|
||
**Homepage:** <https://github.com/onmetal/virtual-controlplane/> | ||
|
||
## Source Code | ||
|
||
* <https://github.com/onmetal/virtual-controlplane/charts/druid> | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| druid.ignoreOperationAnnotation | bool | `true` | ignore operation annotation | | ||
| druid.leaderElection | bool | `true` | perform leader election | | ||
| druid.port | int | `9569` | container port | | ||
| druid.replicaCount | int | `1` | pod instance count | | ||
| druid.resources | object | `{}` | resource requests and limits for deployment | | ||
| druid.workerCount | int | `3` | number of workers | | ||
| image.pullPolicy | string | `"IfNotPresent"` | pull policy | | ||
| image.repository | string | `"eu.gcr.io/gardener-project/gardener/etcd-druid"` | image location | | ||
| image.tag | string | `"v0.6.0"` | image version tag | | ||
| imagePullSecrets | list | `[]` | image pull secrets | | ||
| serviceAccount | string | `"etcd-druid"` | service account to use | |
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,14 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.badgesSection" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ 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
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 |
---|---|---|
|
@@ -4,4 +4,3 @@ kind: ServiceAccount | |
metadata: | ||
name: {{ .Values.serviceAccount }} | ||
namespace: {{ .Release.Namespace }} | ||
|
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,24 @@ | ||
# 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/ | ||
README.md.gotmpl |
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,12 @@ | ||
apiVersion: v2 | ||
description: Helm chart for deploying etcd through etcd druid. | ||
name: etcd | ||
type: application | ||
version: 0.1.0 | ||
appVersion: 3.4.13 | ||
engine: gotpl | ||
home: https://github.com/onmetal/virtual-controlplane/ | ||
sources: | ||
- https://github.com/onmetal/virtual-controlplane/charts/etcd | ||
maintainers: | ||
- name: afritzler |
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,38 @@ | ||
# etcd | ||
|
||
![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: 3.4.13](https://img.shields.io/badge/AppVersion-3.4.13-informational?style=flat-square) | ||
|
||
Helm chart for deploying etcd through etcd druid. | ||
|
||
**Homepage:** <https://github.com/onmetal/virtual-controlplane/> | ||
|
||
## Source Code | ||
|
||
* <https://github.com/onmetal/virtual-controlplane/charts/etcd> | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| backup.compression | object | `{"enabled":false,"policy":"gzip"}` | backup bucket configuration store: secretRef: name: etcd-backup container: mybackupcontainer provider: aws prefix: etcd-test | | ||
| backup.compression.enabled | bool | `false` | enable/disable backup compression | | ||
| backup.compression.policy | string | `"gzip"` | backup compression policy | | ||
| backup.deltaSnapshotMemoryLimit | string | `"1Gi"` | delate snapshot memory limit | | ||
| backup.deltaSnapshotPeriod | string | `"300s"` | delta snapshot period | | ||
| backup.fullSnapshotSchedule | string | `"0 */24 * * *"` | schedule when to run the full backup | | ||
| backup.garbageCollectionPeriod | string | `"43200s"` | garbage collection period | | ||
| backup.garbageCollectionPolicy | string | `"Exponential"` | garbage collection policy | | ||
| backup.port | int | `8080` | port of the backup sidecar | | ||
| backup.resources | object | `{"limits":{"cpu":"500m","memory":"2Gi"},"requests":{"cpu":"23m","memory":"128Mi"}}` | resource requests and limits of the backup sidecar | | ||
| etcd.clientPort | int | `2379` | etcd client port | | ||
| etcd.defragmentationSchedule | string | `"0 */24 * * *"` | etcd defragmentation schedule | | ||
| etcd.metrics | string | `"basic"` | etcd metrics type | | ||
| etcd.quota | string | `"8Gi"` | etcd server quota | | ||
| etcd.resources | object | `{"limits":{"cpu":"2500m","memory":"4Gi"},"requests":{"cpu":"500m","memory":"1000Mi"}}` | resource requests and limits of etcd | | ||
| etcd.serverPort | int | `2380` | etcd server port | | ||
| etcd.tls.enabled | bool | `true` | enable etcd server tls | | ||
| replicas | int | `1` | replica count of the etcd statefulset | | ||
| sharedConfig.autoCompactionMode | string | `"periodic"` | compaction mode | | ||
| sharedConfig.autoCompactionRetention | string | `"30m"` | compaction retention | | ||
| storageCapacity | string | `"1Gi"` | etcd disk size | | ||
| storageClass | string | `"standard"` | etcd pvc storage class | |
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,14 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.badgesSection" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ 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,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "etcd.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 "etcd.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 "etcd.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "etcd.labels" -}} | ||
helm.sh/chart: {{ include "etcd.chart" . }} | ||
{{ include "etcd.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "etcd.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "etcd.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "etcd.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "etcd.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{{- if .Values.etcd.tls.enabled }} | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: selfsigned-issuer | ||
spec: | ||
selfSigned: {} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: etcd-ca | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
isCA: true | ||
commonName: etcd | ||
secretName: etcd-ca | ||
privateKey: | ||
algorithm: ECDSA | ||
size: 256 | ||
issuerRef: | ||
name: selfsigned-issuer | ||
kind: ClusterIssuer | ||
group: cert-manager.io | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: etcd-server | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
secretName: etcd-server-tls | ||
duration: 2160h # 90d | ||
renewBefore: 360h # 15d | ||
subject: | ||
organizations: | ||
- onmetal | ||
commonName: etcd-server | ||
isCA: false | ||
privateKey: | ||
algorithm: RSA | ||
encoding: PKCS1 | ||
size: 2048 | ||
usages: | ||
- server auth | ||
- client auth | ||
dnsNames: | ||
- localhost | ||
- etcd-local | ||
- etcd-client.{{ .Release.Namespace }}.svc | ||
- etcd-client.{{ .Release.Namespace }}.svc.cluster.local | ||
issuerRef: | ||
name: etcd-ca | ||
kind: Issuer | ||
group: cert-manager.io | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: etcd-client | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
secretName: etcd-client-tls | ||
duration: 2160h # 90d | ||
renewBefore: 360h # 15d | ||
subject: | ||
organizations: | ||
- onmetal | ||
commonName: etcd-client | ||
isCA: false | ||
privateKey: | ||
algorithm: RSA | ||
encoding: PKCS1 | ||
size: 2048 | ||
usages: | ||
- server auth | ||
- client auth | ||
issuerRef: | ||
name: etcd-ca | ||
kind: Issuer | ||
group: cert-manager.io | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: etcd-ca | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ca: | ||
secretName: etcd-ca | ||
{{- end }} |
Oops, something went wrong.