Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
5c0b5fe
Bump sigs.k8s.io/controller-tools from 0.17.1 to 0.17.2 in /tools/mod
dependabot[bot] Feb 10, 2025
6999cbf
Move certificate interface into dedicated package to avoid cycle depe…
ahrtr Feb 12, 2025
cec8afd
Convert existing e2e tests from Gingko to e2e framework
abdurrehman107 Feb 13, 2025
4f486a3
Bump golangci-lint from v1.63.4 to v1.64.5
ivanvc Feb 15, 2025
d43ef78
Remove unnecessary make command to install tools in e2e tests
ivanvc Feb 15, 2025
175fe1a
Fix Apache License in e2e_suite_test
ivanvc Feb 15, 2025
06c1d2f
e2e tests: remove make manifests command call
ivanvc Feb 15, 2025
14afa3b
Bump the k8s group with 5 updates
dependabot[bot] Feb 17, 2025
7f37c44
cleanup: refactor code with wait.ExponentialBackoffWithContext
nayihz Feb 13, 2025
3dec9d0
Add ‘kind’ to pinned tool dependencies and ensure it’s on PATH for E2…
abdurrehman107 Feb 18, 2025
1aa78c6
remove gingko from test/utils
abdurrehman107 Feb 19, 2025
75f7864
Add ivanvc as reviewer
ivanvc Feb 20, 2025
0da6374
Update golangci-lint installation to use installation script
ivanvc Feb 20, 2025
e127057
Update golang toolchain to 1.24.0
ivanvc Feb 15, 2025
1261af0
Support data persistent: integrate with storageClass
gdasson Jan 18, 2025
4b0b3f1
Add certificate management user interface
ahrtr Feb 25, 2025
9bcf241
Update dev container to Go 1.24
frederiko Feb 28, 2025
545be33
Bump github.com/golangci/golangci-lint in /tools/mod
dependabot[bot] Mar 3, 2025
458b09e
[etcd-operator] helm chart
luismacosta Mar 4, 2025
c5eac5d
Print more detailed log when running unit test
ahrtr Mar 4, 2025
6b31538
[etcd-operator] helm chart
luismacosta Mar 4, 2025
7d3344c
[etcd-operator] helm chart
luismacosta Mar 4, 2025
3260502
Support data persistent: integrate with storageClass
gdasson Jan 18, 2025
14b5753
Update manager.yaml
luismacosta Mar 5, 2025
a953451
Update helm/templates/rbac/role.yaml
luismacosta Mar 5, 2025
40de1a9
Update helm/templates/rbac/role_binding.yaml
luismacosta Mar 5, 2025
62a2789
Update helm/templates/rbac/etcdcluster_editor_role.yaml
luismacosta Mar 5, 2025
d3e5b7d
Update helm/templates/rbac/etcdcluster_viewer_role.yaml
luismacosta Mar 5, 2025
98403a2
Update helm/templates/rbac/leader_election_role.yaml
luismacosta Mar 5, 2025
50ee359
Update helm/templates/rbac/metrics_auth_role.yaml
luismacosta Mar 5, 2025
fc46005
Update helm/templates/rbac/metrics_auth_role_binding.yaml
luismacosta Mar 5, 2025
31e26bb
Update helm/templates/rbac/leader_election_role_binding.yaml
luismacosta Mar 5, 2025
6f4dc74
test
luismacosta Mar 5, 2025
bf6e53f
test
luismacosta Mar 5, 2025
f4d148b
test
luismacosta Mar 5, 2025
29098a2
test
luismacosta Mar 5, 2025
fe5b1a3
Convert existing e2e tests from Gingko to e2e framework
abdurrehman107 Feb 13, 2025
b7a96d7
Remove unnecessary make command to install tools in e2e tests
ivanvc Feb 15, 2025
27503ca
:e2e tests: remove make manifests command call
ivanvc Feb 15, 2025
bb03ebe
fix helpers
luismacosta Mar 5, 2025
efc94d5
cleanup: refactor code with wait.ExponentialBackoffWithContext
nayihz Feb 13, 2025
40d332c
Add ‘kind’ to pinned tool dependencies and ensure it’s on PATH for E2…
abdurrehman107 Feb 18, 2025
1251064
Update golang toolchain to 1.24.0
ivanvc Feb 15, 2025
415ebeb
Support data persistent: integrate with storageClass
gdasson Jan 18, 2025
b8d0d77
Add certificate management user interface
ahrtr Feb 25, 2025
0319090
fix deployment
luismacosta Mar 5, 2025
ea127e8
fix helpers
luismacosta Mar 5, 2025
582f2c1
Bump sigs.k8s.io/controller-tools from 0.17.1 to 0.17.2 in /tools/mod
dependabot[bot] Feb 10, 2025
e6f398e
Convert existing e2e tests from Gingko to e2e framework
abdurrehman107 Feb 13, 2025
7a67431
Bump golangci-lint from v1.63.4 to v1.64.5
ivanvc Feb 15, 2025
d92425d
Remove unnecessary make command to install tools in e2e tests
ivanvc Feb 15, 2025
2c6c919
Bump the k8s group with 5 updates
dependabot[bot] Feb 17, 2025
9dd5706
Add ‘kind’ to pinned tool dependencies and ensure it’s on PATH for E2…
abdurrehman107 Feb 18, 2025
0bee4a5
Support data persistent: integrate with storageClass
gdasson Jan 18, 2025
483c751
Add certificate management user interface
ahrtr Feb 25, 2025
b780765
Update go.sum
luismacosta Mar 5, 2025
2ee39a2
Update go.sum
luismacosta Mar 5, 2025
0a719eb
Bump sigs.k8s.io/controller-tools from 0.17.1 to 0.17.2 in /tools/mod
dependabot[bot] Feb 10, 2025
57b2073
Convert existing e2e tests from Gingko to e2e framework
abdurrehman107 Feb 13, 2025
ac6c6bc
Bump golangci-lint from v1.63.4 to v1.64.5
ivanvc Feb 15, 2025
07a112d
Remove unnecessary make command to install tools in e2e tests
ivanvc Feb 15, 2025
e914926
Bump the k8s group with 5 updates
dependabot[bot] Feb 17, 2025
db87105
Add ‘kind’ to pinned tool dependencies and ensure it’s on PATH for E2…
abdurrehman107 Feb 18, 2025
170551a
Support data persistent: integrate with storageClass
gdasson Jan 18, 2025
6c1b04f
Merge branch 'main' into helm-chart
luismacosta Mar 6, 2025
f6bd6e9
Update manager.yaml
luismacosta Mar 6, 2025
0a7ebe4
Update helm/templates/rbac/metrics_auth_role_binding.yaml
luismacosta Mar 6, 2025
8898ef8
Update helm/templates/rbac/metrics_reader_role.yaml
luismacosta Mar 6, 2025
709a119
Update helm/templates/default/metrics_service.yaml
luismacosta Mar 6, 2025
0fbcbdb
PR review suggestions
luismacosta Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions helm/.helmignore
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/
34 changes: 34 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: v2
name: etcd-operator
description: The official Kubernetes operator for etcd.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# Same value as in values.yml#image.tag

icon: https://avatars.githubusercontent.com/u/41972792?s=48&v=4

home: https://github.com/etcd-io/etcd-operator/tree/main
sources:
- https://github.com/luismacosta/etcd-operator/helm

maintainers:
- name: etcd-io

appVersion: v3.5.18
version: 3.5.18
54 changes: 54 additions & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# etcd-operator

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

The official Kubernetes operator for etcd.

**Homepage:** <https://github.com/etcd-io/etcd-operator/tree/main>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| etcd-io | | |

## Source Code

* <https://github.com/luismacosta/etcd-operator/helm>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| annotations | object | `{}` | |
| commonLabels | object | `{}` | Labels that get applied to every resource's metadata |
| image.repository | string | `"quay.io/coreos/etcd-operator"` | |
| image.tag | string | `"1.0.0"` | |
| livenessProbe.failureThreshold | int | `3` | |
| livenessProbe.initialDelaySeconds | int | `15` | |
| livenessProbe.periodSeconds | int | `20` | |
| livenessProbe.port | int | `8081` | |
| livenessProbe.timeoutSeconds | int | `1` | |
| manager.replicas | int | `1` | |
| nameOverride | string | `nil` | |
| networkPolicy.enabled | bool | `false` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | [Pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) configuration. To remove the default, set it to null (or `~`). |
| prometheus.enabled | bool | `false` | |
| readinessProbe.failureThreshold | int | `12` | |
| readinessProbe.initialDelaySeconds | int | `5` | |
| readinessProbe.periodSeconds | int | `10` | |
| readinessProbe.port | int | `8081` | |
| readinessProbe.timeoutSeconds | int | `1` | |
| resources.limits.cpu | string | `"500m"` | |
| resources.limits.memory | string | `"128Mi"` | |
| resources.requests.cpu | string | `"10m"` | |
| resources.requests.memory | string | `"64Mi"` | |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `"controller-manager"` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| terminationGracePeriodSeconds | int | `10` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
100 changes: 100 additions & 0 deletions helm/crds/operator.etcd.io_etcdclusters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.2
name: etcdclusters.operator.etcd.io
spec:
group: operator.etcd.io
names:
kind: EtcdCluster
listKind: EtcdClusterList
plural: etcdclusters
singular: etcdcluster
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: EtcdCluster is the Schema for the etcdclusters API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: EtcdClusterSpec defines the desired state of EtcdCluster.
properties:
size:
description: Size is the expected size of the etcd cluster.
type: integer
storageSpec:
description: StorageSpec is the name of the StorageSpec to use for
the etcd cluster. If not provided, then each POD just uses the temporary
storage inside the container.
properties:
accessModes:
type: string
pvcName:
type: string
storageClassName:
type: string
volumeSizeLimit:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
volumeSizeRequest:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- volumeSizeRequest
type: object
tls:
description: TLS is the TLS certificate configuration to use for the
etcd cluster and etcd operator.
properties:
provider:
type: string
providerCfg:
properties:
autoCfg:
type: object
certManagerCfg:
type: object
type: object
type: object
version:
description: Version is the expected version of the etcd container
image.
type: string
required:
- size
- version
type: object
status:
description: EtcdClusterStatus defines the observed state of EtcdCluster.
type: object
type: object
served: true
storage: true
subresources:
status: {}
66 changes: 66 additions & 0 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "etcd-operator.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-operator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if hasPrefix .Release.Name $name }}
{{- $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-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "etcd-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "etcd-operator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "etcd-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "etcd-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "etcd-operator.labels" -}}
helm.sh/chart: {{ include "etcd-operator.chart" . }}
{{ include "etcd-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels }}
{{ tpl (toYaml .Values.commonLabels) . }}
{{- end }}
{{- end }}
16 changes: 16 additions & 0 deletions helm/templates/default/metrics_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: etcd-operator
name: {{ include "etcd-operator.name" . }}-controller-manager-metrics-service
namespace: {{ .Release.Namespace }}
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: 8443
selector:
control-plane: controller-manager
66 changes: 66 additions & 0 deletions helm/templates/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "etcd-operator.name" . }}-controller-manager
namespace: {{ .Release.Namespace }}
labels:
control-plane: controller-manager
{{- include "etcd-operator.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.annotations | nindent 4 }}
spec:
selector:
matchLabels:
control-plane: controller-manager
{{- include "etcd-operator.selectorLabels" . | nindent 6 }}
replicas: {{ .Values.manager.replicas }}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
control-plane: controller-manager
{{- include "etcd-operator.labels" . | nindent 8 }}
spec:
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- command:
- /manager
args:
- --leader-elect
- --health-probe-bind-address=:8081
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
name: manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.livenessProbe.port }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
readinessProbe:
httpGet:
path: /readyz
port: {{ .Values.livenessProbe.port }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
serviceAccountName: {{ include "etcd-operator.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
28 changes: 28 additions & 0 deletions helm/templates/network-policy/allow-metrics-traffic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This NetworkPolicy allows ingress traffic
# with Pods running on namespaces labeled with 'metrics: enabled'. Only Pods on those
# namespaces are able to gathering data from the metrics endpoint.
{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "etcd-operator.name" . }}-allow-metrics-traffic
namespace: {{ .Release.Namespace }}
labels:
{{- include "etcd-operator.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
control-plane: controller-manager
{{- include "etcd-operator.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
ingress:
# This allows ingress traffic from any namespace with the label metrics: enabled
- from:
- namespaceSelector:
matchLabels:
metrics: enabled # Only from namespaces with this label
ports:
- port: 8443
protocol: TCP
{{- end }}
Loading