Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ Gather node information:
talm -n 1.2.3.4 -e 1.2.3.4 template -t templates/controlplane.yaml -i > nodes/node1.yaml
```

If you are testing template rendering you can pass the flag --offline. Also using the --full flag will generate a complete configuration, usefull for testing proper rendering of the templates.
```bash
talm template -t templates/controlplane.yaml --full -i > nodes/cp1.yaml --offline
talm template -t templates/worker.yaml --full -i > nodes/worker1.yaml --offline
```

Edit `nodes/node1.yaml` file:
```yaml
# talm: nodes=["1.2.3.4"], endpoints=["1.2.3.4"], templates=["templates/controlplane.yaml"]
Expand Down
8 changes: 6 additions & 2 deletions charts/cozystack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ machine:
network:
hostname: {{ include "talm.discovered.hostname" . | quote }}
nameservers: {{ include "talm.discovered.default_resolvers" . }}
{{- if .Values.kubespan }}
kubespan:
enabled: true
{{- end }}
{{- (include "talm.discovered.physical_links_info" .) | nindent 4 }}
interfaces:
{{- $existingInterfacesConfiguration := include "talm.discovered.existing_interfaces_configuration" . }}
Expand Down Expand Up @@ -85,7 +89,7 @@ cluster:
controlPlane:
endpoint: "{{ .Values.endpoint }}"
{{- if eq .MachineType "controlplane" }}
allowSchedulingOnControlPlanes: true
allowSchedulingOnControlPlanes: {{ if eq .Values.allowSchedulingOnControlPlanes false }}false{{ else }}true{{ end }}
controllerManager:
extraArgs:
bind-address: 0.0.0.0
Expand All @@ -108,7 +112,7 @@ cluster:
proxy:
disabled: true
discovery:
enabled: false
enabled: {{ .Values.kubespan }}
etcd:
advertisedSubnets:
{{- toYaml .Values.advertisedSubnets | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/cozystack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ serviceSubnets:
advertisedSubnets:
- 192.168.100.0/24
oidcIssuerUrl: ""
certSANs: []
certSANs: []
4 changes: 4 additions & 0 deletions charts/generic/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ machine:
network:
hostname: {{ include "talm.discovered.hostname" . | quote }}
nameservers: {{ include "talm.discovered.default_resolvers" . }}
{{- if .Values.kubespan }}
kubespan:
enabled: true
{{- end }}
{{- (include "talm.discovered.physical_links_info" .) | nindent 4 }}
interfaces:
{{- $existingInterfacesConfiguration := include "talm.discovered.existing_interfaces_configuration" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ serviceSubnets:
- 10.96.0.0/16
advertisedSubnets:
- 192.168.100.0/24
certSANs: []
certSANs: []
18 changes: 12 additions & 6 deletions pkg/generated/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ machine:
network:
hostname: {{ include "talm.discovered.hostname" . | quote }}
nameservers: {{ include "talm.discovered.default_resolvers" . }}
{{- if .Values.kubespan }}
kubespan:
enabled: true
{{- end }}
{{- (include "talm.discovered.physical_links_info" .) | nindent 4 }}
interfaces:
{{- $existingInterfacesConfiguration := include "talm.discovered.existing_interfaces_configuration" . }}
Expand Down Expand Up @@ -115,7 +119,7 @@ cluster:
controlPlane:
endpoint: "{{ .Values.endpoint }}"
{{- if eq .MachineType "controlplane" }}
allowSchedulingOnControlPlanes: true
allowSchedulingOnControlPlanes: {{ if eq .Values.allowSchedulingOnControlPlanes false }}false{{ else }}true{{ end }}
controllerManager:
extraArgs:
bind-address: 0.0.0.0
Expand All @@ -138,7 +142,7 @@ cluster:
proxy:
disabled: true
discovery:
enabled: false
enabled: {{ .Values.kubespan }}
etcd:
advertisedSubnets:
{{- toYaml .Values.advertisedSubnets | nindent 6 }}
Expand All @@ -162,8 +166,7 @@ serviceSubnets:
advertisedSubnets:
- 192.168.100.0/24
oidcIssuerUrl: ""
certSANs: []
`,
certSANs: []`,
"generic/Chart.yaml": `apiVersion: v2
name: %s
type: application
Expand Down Expand Up @@ -208,6 +211,10 @@ machine:
network:
hostname: {{ include "talm.discovered.hostname" . | quote }}
nameservers: {{ include "talm.discovered.default_resolvers" . }}
{{- if .Values.kubespan }}
kubespan:
enabled: true
{{- end }}
{{- (include "talm.discovered.physical_links_info" .) | nindent 4 }}
interfaces:
{{- $existingInterfacesConfiguration := include "talm.discovered.existing_interfaces_configuration" . }}
Expand Down Expand Up @@ -259,8 +266,7 @@ serviceSubnets:
- 10.96.0.0/16
advertisedSubnets:
- 192.168.100.0/24
certSANs: []
`,
certSANs: []`,
"talm/Chart.yaml": `apiVersion: v2
type: library
name: %s
Expand Down