Skip to content

Commit

Permalink
try with nodeport
Browse files Browse the repository at this point in the history
  • Loading branch information
dfry committed Jun 2, 2023
1 parent f1b0b41 commit 197abba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
3 changes: 2 additions & 1 deletion mojaloop/iac/roles/argocd/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ external_secrets_version: "0.8.2"
external_secrets_namespace: "external-secrets"
kubeconfig_location: "/etc/rancher/k3s/k3s.yaml"
root_app_path: "infra/app-yamls"
netmaker_image_version: "0.18.7"
netmaker_image_version: "0.18.7"
wireguard_node_port: "31821"
46 changes: 25 additions & 21 deletions mojaloop/iac/roles/argocd/templates/netclient.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app: netclient-gateway
name: netclient-nodeport
spec:
externalTrafficPolicy: Local
type: NodePort
ports:
- port: {{ wireguard_node_port }}
nodePort: {{ wireguard_node_port }}
protocol: UDP
targetPort: {{ wireguard_node_port }}
name: wg-iface-{{ wireguard_node_port }}
selector:
app: netclient-gateway
---
apiVersion: apps/v1
kind: DaemonSet
kind: Deployment
metadata:
name: netclient
name: netclient-gateway
labels:
app: netclient
app: netclient-gateway
spec:
selector:
matchLabels:
app: netclient
app: netclient-gateway
replicas: 1
template:
metadata:
labels:
app: netclient
app: netclient-gateway
spec:
hostNetwork: true
containers:
- name: netclient
image: gravitl/netclient:v{{ netmaker_image_version }}
env:
- name: NETCLIENT_ROAMING
value: "no"
- name: NETCLIENT_PORT
value: "51821"
- name: NETCLIENT_IS_STATIC
value: "yes"
- name: NETCLIENT_ENDPOINT
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: TOKEN
valueFrom:
secretKeyRef:
Expand All @@ -36,19 +46,13 @@ spec:
volumeMounts:
- mountPath: /etc/netclient
name: etc-netclient
- mountPath: /usr/bin/wg
name: wg
securityContext:
privileged: true
volumes:
- hostPath:
path: /etc/netclient
type: DirectoryOrCreate
name: etc-netclient
- hostPath:
path: /usr/bin/wg
type: File
name: wg
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
Expand Down

0 comments on commit 197abba

Please sign in to comment.