diff --git a/infrastructures/metallb-conf/env/k3s-cluster/advertisement.yaml b/infrastructures/metallb-conf/env/k3s-cluster/advertisement.yaml index 1a9fa24..dcdd3b6 100644 --- a/infrastructures/metallb-conf/env/k3s-cluster/advertisement.yaml +++ b/infrastructures/metallb-conf/env/k3s-cluster/advertisement.yaml @@ -2,7 +2,13 @@ apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: l2-advertisement - namespace: metallb-system + namespace: metallb spec: ipAddressPools: - - k3s-cluster-ips \ No newline at end of file + - k3s-cluster-ips + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/os + operator: In + values: + - linux \ No newline at end of file diff --git a/infrastructures/metallb-conf/env/k3s-cluster/cluster-ip.yaml b/infrastructures/metallb-conf/env/k3s-cluster/cluster-ip.yaml index 578726c..9ba1ecf 100644 --- a/infrastructures/metallb-conf/env/k3s-cluster/cluster-ip.yaml +++ b/infrastructures/metallb-conf/env/k3s-cluster/cluster-ip.yaml @@ -2,7 +2,7 @@ apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: k3s-cluster-ips - namespace: metallb-system + namespace: metallb spec: addresses: - 192.168.10.100/32 diff --git a/infrastructures/metallb-conf/env/k3s-cluster/config.json b/infrastructures/metallb-conf/env/k3s-cluster/config.json index af85c10..df65c2a 100644 --- a/infrastructures/metallb-conf/env/k3s-cluster/config.json +++ b/infrastructures/metallb-conf/env/k3s-cluster/config.json @@ -1,8 +1,8 @@ { "appName": "metallb-conf", "userGivenName": "metallb-conf", - "namespace": "metallb-system", - "destNamespace": "metallb-system", + "namespace": "metallb", + "destNamespace": "metallb", "destServer": "https://kubernetes.default.svc", "srcPath": "infrastructures/metallb-conf/env/k3s-cluster", "srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git", diff --git a/infrastructures/metallb-conf/env/k3s-cluster/kustomization.yaml b/infrastructures/metallb-conf/env/k3s-cluster/kustomization.yaml index b70fdad..1672071 100644 --- a/infrastructures/metallb-conf/env/k3s-cluster/kustomization.yaml +++ b/infrastructures/metallb-conf/env/k3s-cluster/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ./cluster-ip.yaml - - ./advertisement.yaml \ No newline at end of file + - ./advertisement.yaml + - ./cluster-ip.yaml \ No newline at end of file diff --git a/infrastructures/metallb/env/k3s-cluster/kustomization.yaml b/infrastructures/metallb/env/k3s-cluster/kustomization.yaml index f34b4e2..a75e522 100644 --- a/infrastructures/metallb/env/k3s-cluster/kustomization.yaml +++ b/infrastructures/metallb/env/k3s-cluster/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization helmCharts: - name: metallb - repo: https://metallb.github.io/metallb - version: 0.14.8 - releaseName: metallb \ No newline at end of file + repo: oci://registry-1.docker.io/bitnamicharts + version: 6.3.10 + releaseName: metallb + valuesFile: values.yaml \ No newline at end of file diff --git a/infrastructures/metallb/env/k3s-cluster/values.yaml b/infrastructures/metallb/env/k3s-cluster/values.yaml new file mode 100644 index 0000000..abea11d --- /dev/null +++ b/infrastructures/metallb/env/k3s-cluster/values.yaml @@ -0,0 +1,7 @@ +namespaceOverride: "metallb-system" +controller: + podSecurityContext: + fsGroup: 1000 + containerSecurityContext: + runAsUser: 1000 + runAsGroup: 1000 diff --git a/resources/namespaces/env/k3s-cluster/templates/metallb-system.yaml b/resources/namespaces/env/k3s-cluster/templates/metallb.yaml similarity index 86% rename from resources/namespaces/env/k3s-cluster/templates/metallb-system.yaml rename to resources/namespaces/env/k3s-cluster/templates/metallb.yaml index b219659..917148c 100644 --- a/resources/namespaces/env/k3s-cluster/templates/metallb-system.yaml +++ b/resources/namespaces/env/k3s-cluster/templates/metallb.yaml @@ -4,6 +4,6 @@ metadata: annotations: argocd.argoproj.io/sync-options: Prune=false creationTimestamp: null - name: metallb-system + name: metallb spec: {} status: {}