diff --git a/clusters/my-cluster/nginx/kustomization.yaml b/clusters/my-cluster/nginx/kustomization.yaml new file mode 100644 index 0000000..486ea44 --- /dev/null +++ b/clusters/my-cluster/nginx/kustomization.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: nginx-ingress +resources: + - namespace.yaml + - repository.yaml + - release.yaml diff --git a/clusters/my-cluster/nginx/namespace.yaml b/clusters/my-cluster/nginx/namespace.yaml new file mode 100644 index 0000000..b929382 --- /dev/null +++ b/clusters/my-cluster/nginx/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: nginx-ingress diff --git a/clusters/my-cluster/nginx/release.yaml b/clusters/my-cluster/nginx/release.yaml new file mode 100644 index 0000000..ab87214 --- /dev/null +++ b/clusters/my-cluster/nginx/release.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: nginx-ingress + namespace: nginx-ingress +spec: + releaseName: nginx-ingress + chart: + spec: + chart: nginx-ingress + sourceRef: + kind: HelmRepository + name: nginx-ingress + interval: 50m + install: + remediation: + retries: 3 diff --git a/clusters/my-cluster/nginx/repository.yaml b/clusters/my-cluster/nginx/repository.yaml new file mode 100644 index 0000000..3b90717 --- /dev/null +++ b/clusters/my-cluster/nginx/repository.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: nginx-ingress + namespace: nginx-ingress +spec: + interval: 5m + url: oci://ghcr.io/nginxinc/charts/nginx-ingress diff --git a/temp.json b/temp.json new file mode 100644 index 0000000..69b27b9 --- /dev/null +++ b/temp.json @@ -0,0 +1,65 @@ +{ + "apiVersion": "v1", + "kind": "Namespace", + "metadata": { + "annotations": { + "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"labels\":{\"app.kubernetes.io/instance\":\"flux-system\",\"app.kubernetes.io/part-of\":\"flux\",\"app.kubernetes.io/version\":\"v2.3.0\",\"pod-security.kubernetes.io/warn\":\"restricted\",\"pod-security.kubernetes.io/warn-version\":\"latest\"},\"name\":\"flux-system\"}}\n" + }, + "creationTimestamp": "2024-08-06T20:28:12Z", + "deletionTimestamp": "2024-08-06T20:28:34Z", + "labels": { + "app.kubernetes.io/instance": "flux-system", + "app.kubernetes.io/part-of": "flux", + "app.kubernetes.io/version": "v2.3.0", + "kubernetes.io/metadata.name": "flux-system", + "pod-security.kubernetes.io/warn": "restricted", + "pod-security.kubernetes.io/warn-version": "latest" + }, + "name": "flux-system", + "resourceVersion": "7727", + "uid": "9083e227-1e7a-4d0a-868a-ac04edda1a9e" + }, + "spec": { + "finalizers": [] + }, + "status": { + "conditions": [ + { + "lastTransitionTime": "2024-08-06T20:28:40Z", + "message": "All resources successfully discovered", + "reason": "ResourcesDiscovered", + "status": "False", + "type": "NamespaceDeletionDiscoveryFailure" + }, + { + "lastTransitionTime": "2024-08-06T20:28:40Z", + "message": "All legacy kube types successfully parsed", + "reason": "ParsedGroupVersions", + "status": "False", + "type": "NamespaceDeletionGroupVersionParsingFailure" + }, + { + "lastTransitionTime": "2024-08-06T20:28:40Z", + "message": "All content successfully deleted, may be waiting on finalization", + "reason": "ContentDeleted", + "status": "False", + "type": "NamespaceDeletionContentFailure" + }, + { + "lastTransitionTime": "2024-08-06T20:28:40Z", + "message": "Some resources are remaining: gitrepositories.source.toolkit.fluxcd.io has 1 resource instances, kustomizations.kustomize.toolkit.fluxcd.io has 1 resource instances", + "reason": "SomeResourcesRemain", + "status": "True", + "type": "NamespaceContentRemaining" + }, + { + "lastTransitionTime": "2024-08-06T20:28:40Z", + "message": "Some content in the namespace has finalizers remaining: finalizers.fluxcd.io in 2 resource instances", + "reason": "SomeFinalizersRemain", + "status": "True", + "type": "NamespaceFinalizersRemaining" + } + ], + "phase": "Terminating" + } +}