-
Notifications
You must be signed in to change notification settings - Fork 461
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 #1459 from facchettos/k8s-etcd
embedded etcd in k8s
- Loading branch information
Showing
28 changed files
with
508 additions
and
235 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
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
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 @@ | ||
{{- if eq ( include "vcluster.kind" . ) "StatefulSet" }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-headless | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ template "vcluster.fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
{{- $annotations := merge .Values.globalAnnotations .Values.syncer.serviceAnnotations }} | ||
{{- if $annotations }} | ||
annotations: | ||
{{ toYaml $annotations | indent 4 }} | ||
{{- end }} | ||
spec: | ||
publishNotReadyAddresses: true | ||
ports: | ||
- name: https | ||
port: 443 | ||
targetPort: 8443 | ||
protocol: TCP | ||
{{- if .Values.embeddedEtcd.enabled }} | ||
- name: etcd | ||
port: 2379 | ||
targetPort: 2379 | ||
protocol: TCP | ||
- name: peer | ||
port: 2380 | ||
targetPort: 2380 | ||
protocol: TCP | ||
{{- end }} | ||
clusterIP: None | ||
selector: | ||
app: vcluster | ||
release: "{{ .Release.Name }}" | ||
{{- 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
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 @@ | ||
suite: Syncer | ||
templates: | ||
- syncer.yaml | ||
|
||
tests: | ||
- it: should be a statefulset when embeddedEtcd is enabled | ||
set: | ||
pro: true | ||
embeddedEtcd: | ||
enabled: true | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: StatefulSet | ||
- exists: | ||
path: spec.serviceName | ||
- exists: | ||
path: spec.volumeClaimTemplates | ||
- notExists: | ||
path: spec.strategy | ||
|
||
- it: should be a deployment when embeddedEtcd is disabled | ||
set: | ||
pro: true | ||
embeddedEtcd: | ||
enabled: false | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: Deployment | ||
- notExists: | ||
path: spec.serviceName | ||
- notExists: | ||
path: spec.volumeClaimTemplates | ||
- exists: | ||
path: spec.strategy |
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,20 @@ | ||
{{/* | ||
storage size | ||
*/}} | ||
{{- define "vcluster.storage.size" -}} | ||
{{if .Values.storage }}{{ .Values.storage.size }}{{ else }}{{ .Values.syncer.storage.size }}{{ end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
storage persistence | ||
*/}} | ||
{{- define "vcluster.storage.persistence" -}} | ||
{{if .Values.storage }}{{ .Values.storage.persistence }}{{ else }}{{ .Values.syncer.storage.persistence }}{{ end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
storage classname | ||
*/}} | ||
{{- define "vcluster.storage.className" -}} | ||
{{if .Values.storage }}{{ .Values.storage.className }}{{ else }}{{ .Values.syncer.storage.className }}{{ end }} | ||
{{- end -}} |
Oops, something went wrong.