Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(network): add external-svc ks #716

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Conversation

GeckoSplinter
Copy link
Owner

No description provided.

Copy link

--- kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/external-svc

+++ kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/external-svc

@@ -0,0 +1,37 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: external-svc
+  namespace: flux-system
+spec:
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  interval: 30m
+  path: ./kubernetes/apps/network/external-svc/svc
+  postBuild:
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+    - kind: ConfigMap
+      name: cluster-settings-user
+      optional: true
+    - kind: Secret
+      name: cluster-secrets-user
+      optional: true
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: network
+  timeout: 5m
+  wait: false
+
--- kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Ingress: network/nas

+++ kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Ingress: network/nas

@@ -0,0 +1,25 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    external-dns.alpha.kubernetes.io/target: internal...PLACEHOLDER_SECRET_DOMAIN..
+  labels:
+    kustomize.toolkit.fluxcd.io/name: external-svc
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: nas
+  namespace: network
+spec:
+  ingressClassName: internal
+  rules:
+  - host: nas...PLACEHOLDER_SECRET_DOMAIN..
+    http:
+      paths:
+      - backend:
+          service:
+            name: nas
+            port:
+              number: 443
+        path: /
+        pathType: Prefix
+
--- kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Service: network/nas

+++ kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Service: network/nas

@@ -0,0 +1,15 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: external-svc
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: nas
+  namespace: network
+spec:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 443
+
--- kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Endpoints: network/nas

+++ kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Endpoints: network/nas

@@ -0,0 +1,15 @@

+---
+apiVersion: v1
+kind: Endpoints
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: external-svc
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: nas
+  namespace: network
+subsets:
+- addresses:
+  - ip: 192.168.42.10
+  ports:
+  - port: 443
+
--- kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Ingress: network/pihole

+++ kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Ingress: network/pihole

@@ -0,0 +1,25 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    external-dns.alpha.kubernetes.io/target: internal...PLACEHOLDER_SECRET_DOMAIN..
+  labels:
+    kustomize.toolkit.fluxcd.io/name: external-svc
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: pihole
+  namespace: network
+spec:
+  ingressClassName: internal
+  rules:
+  - host: pihole...PLACEHOLDER_SECRET_DOMAIN..
+    http:
+      paths:
+      - backend:
+          service:
+            name: pihole
+            port:
+              number: 80
+        path: /
+        pathType: Prefix
+
--- kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Service: network/pihole

+++ kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Service: network/pihole

@@ -0,0 +1,16 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: pihole
+    kustomize.toolkit.fluxcd.io/name: external-svc
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: pihole
+  namespace: network
+spec:
+  ports:
+  - port: 80
+    protocol: TCP
+    targetPort: 80
+
--- kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Endpoints: network/pihole

+++ kubernetes/apps/network/external-svc/svc Kustomization: flux-system/external-svc Endpoints: network/pihole

@@ -0,0 +1,16 @@

+---
+apiVersion: v1
+kind: Endpoints
+metadata:
+  labels:
+    app: pihole
+    kustomize.toolkit.fluxcd.io/name: external-svc
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: pihole
+  namespace: network
+subsets:
+- addresses:
+  - ip: 192.168.42.2
+  ports:
+  - port: 80
+

@GeckoSplinter GeckoSplinter merged commit 138e085 into main Dec 16, 2024
5 checks passed
@GeckoSplinter GeckoSplinter deleted the ingress-nas-pihole branch December 16, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant