-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
External Network: Wireguard Templates
- Loading branch information
Showing
18 changed files
with
442 additions
and
84 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
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
69 changes: 69 additions & 0 deletions
69
deployments/liqo/templates/liqo-wireguard-gateway-client-template.yaml
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,69 @@ | ||
{{- $templateConfig := (merge (dict "name" "wireguard-client" "module" "networking") .) -}} | ||
|
||
{{- if .Values.networking.internal }} | ||
|
||
apiVersion: networking.liqo.io/v1alpha1 | ||
kind: WgGatewayClientTemplate | ||
metadata: | ||
name: {{ $templateConfig.name }} | ||
labels: | ||
{{- include "liqo.labels" $templateConfig | nindent 4 }} | ||
spec: | ||
objectKind: | ||
apiVersion: networking.liqo.io/v1alpha1 | ||
kind: WgGatewayClient | ||
template: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 6 }} | ||
spec: | ||
deployment: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 10 }} | ||
spec: | ||
replicas: {{ .Values.networking.gateway.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "liqo.labelsTemplate" $templateConfig | nindent 14 }} | ||
template: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 14 }} | ||
spec: | ||
serviceAccount: "{{"{{ .Name }}"}}" | ||
serviceAccountName: "{{"{{ .Name }}"}}" | ||
containers: | ||
- name: gateway | ||
image: ghcr.io/liqotech/gateway{{ include "liqo.suffix" $templateConfig }}:{{ include "liqo.version" $templateConfig }} | ||
imagePullPolicy: Always | ||
args: | ||
- --name={{"{{ .Name }}"}} | ||
- --namespace={{"{{ .Namespace }}"}} | ||
- --remote-cluster-id={{"{{ .ClusterID }}"}} | ||
- --mode=client | ||
- --metrics-address=:8080 | ||
- --health-probe-bind-address=:8081 | ||
- --ping-loss-threshold={{ .Values.networking.gateway.ping.lossThreshold }} | ||
- --ping-interval={{ .Values.networking.gateway.ping.interval }} | ||
- --ping-update-status-interval={{ .Values.networking.gateway.ping.updateStatusInterval }} | ||
{{- if gt .Values.networking.gateway.replicas 1.0 }} | ||
- --leader-election=true | ||
{{- end }} | ||
- name: wireguard | ||
image: ghcr.io/liqotech/gateway/wireguard{{ include "liqo.suffix" $templateConfig }}:{{ include "liqo.version" $templateConfig }} | ||
imagePullPolicy: Always | ||
args: | ||
- --name={{"{{ .Name }}"}} | ||
- --namespace={{"{{ .Namespace }}"}} | ||
- --remote-cluster-id={{"{{ .ClusterID }}"}} | ||
- --gateway-uid={{"{{ .GatewayUID }}"}} | ||
- --mode=client | ||
- --mtu={{"{{ .Spec.MTU }}"}} | ||
- --endpoint-address={{"{{ index .Spec.Endpoint.Addresses 0 }}"}} | ||
- --endpoint-port={{"{{ .Spec.Endpoint.Port }}"}} | ||
- --metrics-address=:8082 | ||
- --health-probe-bind-address=:8083 | ||
securityContext: | ||
capabilities: | ||
add: | ||
- NET_ADMIN | ||
- NET_RAW | ||
{{- end }} |
82 changes: 82 additions & 0 deletions
82
deployments/liqo/templates/liqo-wireguard-gateway-server-template.yaml
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,82 @@ | ||
{{- $templateConfig := (merge (dict "name" "wireguard-server" "module" "networking") .) -}} | ||
|
||
{{- if .Values.networking.internal }} | ||
|
||
apiVersion: networking.liqo.io/v1alpha1 | ||
kind: WgGatewayServerTemplate | ||
metadata: | ||
name: {{ $templateConfig.name }} | ||
labels: | ||
{{- include "liqo.labels" $templateConfig | nindent 4 }} | ||
spec: | ||
objectKind: | ||
apiVersion: networking.liqo.io/v1alpha1 | ||
kind: WgGatewayServer | ||
template: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 6 }} | ||
spec: | ||
service: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 12 }} | ||
spec: | ||
selector: | ||
{{- include "liqo.labelsTemplate" $templateConfig | nindent 12 }} | ||
type: "{{"{{ .Spec.Endpoint.ServiceType }}"}}" | ||
ports: | ||
- port: "{{"{{ .Spec.Endpoint.Port }}"}}" | ||
protocol: UDP | ||
targetPort: "{{"{{ .Spec.Endpoint.Port }}"}}" | ||
deployment: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 10 }} | ||
spec: | ||
replicas: {{ .Values.networking.gateway.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "liqo.labelsTemplate" $templateConfig | nindent 14 }} | ||
template: | ||
metadata: | ||
{{- include "liqo.metadataTemplate" $templateConfig | nindent 14 }} | ||
spec: | ||
serviceAccount: "{{"{{ .Name }}"}}" | ||
serviceAccountName: "{{"{{ .Name }}"}}" | ||
containers: | ||
- name: gateway | ||
image: ghcr.io/liqotech/gateway{{ include "liqo.suffix" $templateConfig }}:{{ include "liqo.version" $templateConfig }} | ||
imagePullPolicy: Always | ||
args: | ||
- --name={{"{{ .Name }}"}} | ||
- --namespace={{"{{ .Namespace }}"}} | ||
- --remote-cluster-id={{"{{ .ClusterID }}"}} | ||
- --mode=server | ||
- --metrics-address=:8080 | ||
- --health-probe-bind-address=:8081 | ||
- --ping-loss-threshold=5 | ||
- --ping-interval=2s | ||
- --ping-update-status-interval=10s | ||
- --ping-loss-threshold={{ .Values.networking.gateway.ping.lossThreshold }} | ||
- --ping-interval={{ .Values.networking.gateway.ping.interval }} | ||
- --ping-update-status-interval={{ .Values.networking.gateway.ping.updateStatusInterval }} | ||
{{- if gt .Values.networking.gateway.replicas 1.0 }} | ||
- --leader-election=true | ||
{{- end }} | ||
- name: wireguard | ||
image: ghcr.io/liqotech/gateway/wireguard{{ include "liqo.suffix" $templateConfig }}:{{ include "liqo.version" $templateConfig }} | ||
imagePullPolicy: Always | ||
args: | ||
- --name={{"{{ .Name }}"}} | ||
- --namespace={{"{{ .Namespace }}"}} | ||
- --remote-cluster-id={{"{{ .ClusterID }}"}} | ||
- --gateway-uid={{"{{ .GatewayUID }}"}} | ||
- --mode=server | ||
- --mtu={{"{{ .Spec.MTU }}"}} | ||
- --listen-port={{"{{ .Spec.Endpoint.Port }}"}} | ||
- --metrics-address=:8082 | ||
- --health-probe-bind-address=:8083 | ||
securityContext: | ||
capabilities: | ||
add: | ||
- NET_ADMIN | ||
- NET_RAW | ||
{{- 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
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
Oops, something went wrong.