-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test repo to reproduce a connectivity issue (#231)
Issue #225 Issue #198 Reproduces the issue with: ``` $ flux-local get cluster --path tests/testdata/cluster4/ NAME PATH KUSTOMIZATIONS cluster-apps-kubernetes-dashboard ./tests/testdata/cluster4/apps/monitoring/kubernetes-dashboard 1 cluster ./tests/testdata/cluster4/flux 2 ```
- Loading branch information
1 parent
1782ebf
commit 315119c
Showing
20 changed files
with
270 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This repo is modeled after https://github.com/szinn/k8s-homelab where there are | ||
fluxtomizations and kustomziations pointing at the same directory. |
51 changes: 51 additions & 0 deletions
51
tests/testdata/cluster4/apps/monitoring/kubernetes-dashboard/helmrelease.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,51 @@ | ||
--- | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta1 | ||
kind: HelmRelease | ||
metadata: | ||
name: kubernetes-dashboard | ||
namespace: monitoring | ||
spec: | ||
interval: 15m | ||
chart: | ||
spec: | ||
chart: kubernetes-dashboard | ||
version: 6.0.0 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: kubernetes-dashboard | ||
namespace: flux-system | ||
maxHistory: 3 | ||
install: | ||
createNamespace: true | ||
remediation: | ||
retries: 3 | ||
upgrade: | ||
cleanupOnFail: true | ||
remediation: | ||
retries: 3 | ||
uninstall: | ||
keepHistory: false | ||
values: | ||
env: | ||
TZ: America/New_York | ||
extraArgs: | ||
- --enable-skip-login | ||
- --disable-settings-authorizer | ||
- --enable-insecure-login | ||
- --token-ttl=43200 | ||
ingress: | ||
enabled: true | ||
className: nginx | ||
annotations: | ||
nginx.ingress.kubernetes.io/whitelist-source-range: | | ||
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 | ||
hajimari.io/icon: mdi:kubernetes | ||
hosts: | ||
- &host kubernetes.devbu.io | ||
tls: | ||
- hosts: | ||
- *host | ||
metricsScraper: | ||
enabled: true | ||
serviceMonitor: | ||
enabled: false |
20 changes: 20 additions & 0 deletions
20
tests/testdata/cluster4/apps/monitoring/kubernetes-dashboard/ks.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,20 @@ | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 | ||
kind: Kustomization | ||
metadata: | ||
name: cluster-apps-kubernetes-dashboard | ||
namespace: flux-system | ||
spec: | ||
path: ./tests/testdata/cluster4/apps/monitoring/kubernetes-dashboard | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-ops-kubernetes | ||
healthChecks: | ||
- apiVersion: helm.toolkit.fluxcd.io/v2beta1 | ||
kind: HelmRelease | ||
name: kubernetes-dashboard | ||
namespace: monitoring | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m |
10 changes: 10 additions & 0 deletions
10
tests/testdata/cluster4/apps/monitoring/kubernetes-dashboard/kustomization.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,10 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: monitoring | ||
resources: | ||
- ./helmrelease.yaml | ||
labels: | ||
- pairs: | ||
app.kubernetes.io/name: kubernetes-dashboard | ||
app.kubernetes.io/instance: kubernetes-dashboard |
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,6 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./namespace.yaml | ||
- ./kubernetes-dashboard/ks.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,7 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: monitoring | ||
labels: | ||
kustomize.toolkit.fluxcd.io/prune: disabled |
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,13 @@ | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 | ||
kind: Kustomization | ||
metadata: | ||
name: cluster-apps | ||
namespace: flux-system | ||
spec: | ||
interval: 10m | ||
path: ./tests/testdata/cluster4/apps | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-ops-kubernetes |
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,32 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: GitRepository | ||
metadata: | ||
name: home-ops-kubernetes | ||
namespace: flux-system | ||
spec: | ||
interval: 30m | ||
url: ssh://[email protected]/example/home-ops | ||
ref: | ||
branch: main | ||
secretRef: | ||
name: github-deploy-key | ||
ignore: | | ||
# exclude all | ||
/* | ||
# include kubernetes directory | ||
!/tests/testdata/cluster4/kubernetes | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 | ||
kind: Kustomization | ||
metadata: | ||
name: cluster | ||
namespace: flux-system | ||
spec: | ||
interval: 30m | ||
path: ./tests/testdata/cluster4/flux | ||
prune: true | ||
wait: false | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-ops-kubernetes |
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,25 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: OCIRepository | ||
metadata: | ||
name: flux-manifests | ||
namespace: flux-system | ||
spec: | ||
interval: 10m | ||
url: oci://ghcr.io/fluxcd/flux-manifests | ||
ref: | ||
tag: v0.40.0 | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 | ||
kind: Kustomization | ||
metadata: | ||
name: flux | ||
namespace: flux-system | ||
spec: | ||
interval: 10m | ||
path: ./ | ||
prune: true | ||
wait: true | ||
sourceRef: | ||
kind: OCIRepository | ||
name: flux-manifests |
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,6 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./flux.yaml | ||
- ./cluster.yaml |
9 changes: 9 additions & 0 deletions
9
tests/testdata/cluster4/flux/repositories/kubernetes-dashboard.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,9 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: kubernetes-dashboard | ||
namespace: flux-system | ||
spec: | ||
interval: 2h | ||
url: https://kubernetes.github.io/dashboard/ |
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,5 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- kubernetes-dashboard.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 |
---|---|---|
|
@@ -7,4 +7,4 @@ args: | |
- -o | ||
- yaml | ||
- --sources | ||
- "" | ||
- '' |
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,8 @@ | ||
args: | ||
- get | ||
- cluster | ||
- --path | ||
- tests/testdata/cluster2/ | ||
stdout: | | ||
NAME PATH KUSTOMIZATIONS | ||
cluster ./tests/testdata/cluster2/flux 5 |
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,8 @@ | ||
args: | ||
- get | ||
- cluster | ||
- --path | ||
- tests/testdata/cluster3/ | ||
stdout: | | ||
NAME PATH KUSTOMIZATIONS | ||
flux-system ./tests/testdata/cluster3/ 1 |
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,8 @@ | ||
args: | ||
- get | ||
- cluster | ||
- --path | ||
- tests/testdata/cluster4/ | ||
stdout: | | ||
NAME PATH KUSTOMIZATIONS | ||
cluster ./tests/testdata/cluster4/flux 3 |
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