Last active
January 25, 2023 17:12
-
-
Save ppat/e86c0ae0716e10d5cd4b5f7cbc23f2de to your computer and use it in GitHub Desktop.
configmap not found
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
```bash | |
# k get -n flux-system cm cluster-bootstrap-conf -o yaml | |
apiVersion: v1 | |
data: | |
DOMAIN_NAME: k3s.example.com | |
SOMETHING: unrelated | |
kind: ConfigMap | |
metadata: | |
annotations: | |
kubectl.kubernetes.io/last-applied-configuration: | | |
{"apiVersion":"v1","data":{"DOMAIN_NAME":"k3s.example.com","SOMETHING":"unrelated"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"cluster-bootstrap-conf","namespace":"flux-system"}} | |
creationTimestamp: "2023-01-25T12:58:20Z" | |
name: cluster-bootstrap-conf | |
namespace: flux-system | |
resourceVersion: "829" | |
uid: ed3e6e91-b7e4-491d-bcce-9a9cdf777aef | |
``` |
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
. | |
├── components | |
│ └── patch-ingress | |
│ ├── kustomization.yaml | |
│ └── replace | |
│ └── request-dns-record.yaml | |
└── infrastructure | |
└── networking | |
├── ... | |
└── traefik | |
├── app | |
│ ├── ... | |
│ └── ... | |
├── config | |
│ ├── dashboard-ingress.yaml | |
│ ├── ... | |
│ └── kustomization.yaml | |
└── traefik.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
# components/patch-ingress/kustomization.yaml | |
--- | |
apiVersion: kustomize.config.k8s.io/v1alpha1 | |
kind: Component | |
replacements: | |
- path: replace/request-dns-record.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
# components/patch-ingress/replace/request-dns-record.yaml | |
--- | |
source: | |
kind: ConfigMap | |
namespace: flux-system | |
name: cluster-bootstrap-conf | |
fieldPath: data.DOMAIN_NAME | |
targets: | |
- select: | |
kind: Ingress | |
options: | |
delimiter: "." | |
index: 1 | |
fieldPaths: | |
- metadata.annotations.[external-dns.alpha.kubernetes.io/hostname] |
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
# infrastructure/networking/traefik/config/dashboard-ingress.yaml | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: traefik-dashboard-https | |
namespace: traefik | |
annotations: | |
external-dns.alpha.kubernetes.io/hostname: traefik.placeholder-domain | |
spec: | |
tls: [] | |
rules: | |
- host: traefik.placeholder-domain | |
http: | |
paths: | |
- path: /dashboard | |
pathType: Prefix | |
backend: | |
service: | |
name: traefik-dashboard | |
port: | |
number: 9000 | |
- path: /api | |
pathType: Prefix | |
backend: | |
service: | |
name: traefik-dashboard | |
port: | |
number: 9000 |
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
# infrastructure/networking/traefik/config/kustomization.yaml | |
apiVersion: kustomize.config.k8s.io/v1beta1 | |
kind: Kustomization | |
resources: | |
- ... | |
- dashboard-service.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
# infrastructure/networking/traefik/traefik.yaml | |
--- | |
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 | |
kind: Kustomization | |
metadata: | |
name: traefik-app | |
namespace: flux-system | |
spec: | |
interval: 30m0s | |
path: ./kubernetes/infrastructure/networking/traefik/app | |
prune: true | |
sourceRef: | |
kind: GitRepository | |
name: flux-system | |
namespace: flux-system | |
timeout: 2m0s | |
wait: true | |
--- | |
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 | |
kind: Kustomization | |
metadata: | |
name: traefik-config | |
namespace: flux-system | |
spec: | |
dependsOn: | |
- name: traefik-app | |
interval: 30m0s | |
path: ./kubernetes/infrastructure/networking/traefik/config | |
prune: true | |
sourceRef: | |
kind: GitRepository | |
name: flux-system | |
namespace: flux-system | |
timeout: 2m0s | |
wait: true | |
components: | |
- ../../../../components/patch-ingress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment