feat (common): Readd external-interfaces as expert option (#1698)
This commit is contained in:
@@ -15,4 +15,4 @@ maintainers:
|
|||||||
name: common
|
name: common
|
||||||
sources: null
|
sources: null
|
||||||
type: library
|
type: library
|
||||||
version: 8.10.6
|
version: 8.11.0
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
Secondary entrypoint and primary loader for the common chart
|
Secondary entrypoint and primary loader for the common chart
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "common.postSetup" -}}
|
{{- define "common.postSetup" -}}
|
||||||
|
{{- /* Render the externalInterfaces */ -}}
|
||||||
|
{{ include "common.classes.externalInterfaces" . | nindent 0 }}
|
||||||
|
|
||||||
{{- /* Enable code-server add-on if required */ -}}
|
{{- /* Enable code-server add-on if required */ -}}
|
||||||
{{- if .Values.addons.codeserver.enabled }}
|
{{- if .Values.addons.codeserver.enabled }}
|
||||||
{{- include "common.addon.codeserver" . }}
|
{{- include "common.addon.codeserver" . }}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{{/*
|
||||||
|
This template serves as a blueprint for External Interface objects that are created
|
||||||
|
using the SCALE GUI.
|
||||||
|
*/}}
|
||||||
|
{{- define "common.classes.externalInterfaces" -}}
|
||||||
|
{{- range $index, $iface := .Values.ixExternalInterfacesConfiguration }}
|
||||||
|
---
|
||||||
|
apiVersion: "k8s.cni.cncf.io/v1"
|
||||||
|
kind: NetworkAttachmentDefinition
|
||||||
|
metadata:
|
||||||
|
name: ix-{{ $.Release.Name }}-{{ $index }}
|
||||||
|
spec:
|
||||||
|
config: '{{ $iface }}'
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -212,6 +212,22 @@ networkPolicy:
|
|||||||
# -- add or remove egress policies
|
# -- add or remove egress policies
|
||||||
ingress: []
|
ingress: []
|
||||||
|
|
||||||
|
# -- Use this directly attach a pod to a SCALE interface.
|
||||||
|
# Please be aware: This bypasses k8s services
|
||||||
|
externalInterfaces: []
|
||||||
|
# - hostInterface: "ens3"
|
||||||
|
# ipam:
|
||||||
|
# type: "dhcp"
|
||||||
|
# - hostInterface: "br0"
|
||||||
|
# ipam:
|
||||||
|
# type: "static"
|
||||||
|
# staticIPConfigurations:
|
||||||
|
# - "192.168.0.120/24"
|
||||||
|
# staticRoutes:
|
||||||
|
# - destination: "0.0.0.0/0"
|
||||||
|
# gateway: "192.168.0.1"
|
||||||
|
|
||||||
|
|
||||||
# -- Use this to populate a secret with the values you specify.
|
# -- Use this to populate a secret with the values you specify.
|
||||||
# Be aware that these values are not encrypted by default, and could therefore visible
|
# Be aware that these values are not encrypted by default, and could therefore visible
|
||||||
# to anybody with access to the values.yaml file.
|
# to anybody with access to the values.yaml file.
|
||||||
|
|||||||
@@ -1,3 +1,79 @@
|
|||||||
|
- variable: externalInterfaces
|
||||||
|
description: "Add External Interfaces"
|
||||||
|
label: "Add external Interfaces"
|
||||||
|
group: "Networking"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
items:
|
||||||
|
- variable: interfaceConfiguration
|
||||||
|
description: "Interface Configuration"
|
||||||
|
label: "Interface Configuration"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
$ref:
|
||||||
|
- "normalize/interfaceConfiguration"
|
||||||
|
attrs:
|
||||||
|
- variable: hostInterface
|
||||||
|
description: "Please specify host interface"
|
||||||
|
label: "Host Interface"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
$ref:
|
||||||
|
- "definitions/interface"
|
||||||
|
- variable: ipam
|
||||||
|
description: "Define how IP Address will be managed"
|
||||||
|
label: "IP Address Management"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
required: true
|
||||||
|
attrs:
|
||||||
|
- variable: type
|
||||||
|
description: "Specify type for IPAM"
|
||||||
|
label: "IPAM Type"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
enum:
|
||||||
|
- value: "dhcp"
|
||||||
|
description: "Use DHCP"
|
||||||
|
- value: "static"
|
||||||
|
description: "Use static IP"
|
||||||
|
show_subquestions_if: "static"
|
||||||
|
subquestions:
|
||||||
|
- variable: staticIPConfigurations
|
||||||
|
label: "Static IP Addresses"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
items:
|
||||||
|
- variable: staticIP
|
||||||
|
label: "Static IP"
|
||||||
|
schema:
|
||||||
|
type: ipaddr
|
||||||
|
cidr: true
|
||||||
|
- variable: staticRoutes
|
||||||
|
label: "Static Routes"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
items:
|
||||||
|
- variable: staticRouteConfiguration
|
||||||
|
label: "Static Route Configuration"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: destination
|
||||||
|
label: "Destination"
|
||||||
|
schema:
|
||||||
|
type: ipaddr
|
||||||
|
cidr: true
|
||||||
|
required: true
|
||||||
|
- variable: gateway
|
||||||
|
label: "Gateway"
|
||||||
|
schema:
|
||||||
|
type: ipaddr
|
||||||
|
cidr: false
|
||||||
|
required: true
|
||||||
|
|
||||||
- variable: dnsPolicy
|
- variable: dnsPolicy
|
||||||
group: "Networking and Services"
|
group: "Networking and Services"
|
||||||
label: "dnsPolicy"
|
label: "dnsPolicy"
|
||||||
|
|||||||
Reference in New Issue
Block a user