Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed owner reference from etcd statefulsets #48

Merged
4 changes: 2 additions & 2 deletions api/v1alpha1/etcd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ type EtcdSpec struct {
// It must match the pod template's labels.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
Selector *metav1.LabelSelector `json:"selector"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +required
amshuman-kr marked this conversation as resolved.
Show resolved Hide resolved
Labels map[string]string `json:"labels"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// +required
Expand Down
13 changes: 4 additions & 9 deletions charts/etcd/templates/etcd-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
name: {{ .Values.name }}
namespace: {{ .Release.Namespace }}
annotations:
gardener.cloud/owned-by: "{{ .Release.Namespace }}/{{ .Values.name }}"
gardener.cloud/owner-type: "etcd"
{{- if .Values.annotations }}
{{ toYaml .Values.annotations | indent 4 }}
{{- end }}
Expand All @@ -13,13 +15,6 @@ metadata:
{{- if .Values.labels }}
{{ toYaml .Values.labels | indent 4 }}
{{- end }}
ownerReferences:
- apiVersion: druid.gardener.cloud/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Etcd
name: {{ .Values.name }}
uid: {{ .Values.uid }}
spec:
updateStrategy:
type: RollingUpdate
Expand Down Expand Up @@ -48,9 +43,9 @@ spec:
- ip: "127.0.0.1"
hostnames:
- {{ .Values.name }}-local
{{- if .Values.priorityClassName }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- end }}
containers:
- name: etcd
image: {{ .Values.etcd.image }}
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/druid.gardener.cloud_etcds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ spec:
required:
- backup
- etcd
- labels
- replicas
- selector
type: object
Expand Down
Loading