75 Commits

Author SHA1 Message Date
Tom Alexander
b531c675ed Delete images after 24 hours of being unused. 2026-05-02 17:41:08 -04:00
Tom Alexander
9630c065bb Set up containerd use harbor.fizz.buzz. 2026-05-02 17:41:08 -04:00
Tom Alexander
5e789063a7 Add secrets for archive-box, webhook-bridge, and tekton. 2026-05-02 17:41:08 -04:00
Tom Alexander
9de8c853e3 Allow node-to-node communication. 2026-05-02 15:54:31 -04:00
Tom Alexander
da82a8c494 Use numbers for folder order. 2026-05-02 15:54:31 -04:00
Tom Alexander
26b885c557 Add harbor secrets. 2026-05-02 15:54:31 -04:00
Tom Alexander
5e0ac767a6 Switch to the experimental gateway CRDs for TCPRoute support. 2026-05-02 15:54:31 -04:00
Tom Alexander
db56093582 Add oauth2 proxy secrets. 2026-05-02 15:54:30 -04:00
Tom Alexander
4bcb9d5f47 Add dex secrets. 2026-05-02 15:54:30 -04:00
Tom Alexander
145ff42a1f Enable the firewall. 2026-05-02 15:54:30 -04:00
Tom Alexander
44ddc84237 Add gitea secrets. 2026-05-02 15:54:30 -04:00
Tom Alexander
eaf0c16c17 Add generation for in-repo secrets. 2026-05-02 15:54:30 -04:00
Tom Alexander
4abd80ac98 Enforce cilium network policies. 2026-05-02 15:54:30 -04:00
Tom Alexander
bd4e26dde5 Downgrade to gateway 1.4.1.
1.5 came out recently, so no gateway providers support it.
2026-05-02 15:54:30 -04:00
Tom Alexander
458b4afc9e Update packages in kubernetes/keys. 2026-05-02 15:54:29 -04:00
Tom Alexander
4e7f2dd2f3 Fix network for updated nix. 2026-05-02 15:54:29 -04:00
Tom Alexander
10fe4329e6 Fix proxy auth tls 2026-05-02 15:54:29 -04:00
Tom Alexander
fd1ea9e890 Generate certificates for the aggregation layer. 2026-05-02 15:54:29 -04:00
Tom Alexander
c0ace47d95 Add a note for the cilium connectivity test. 2026-05-02 15:54:29 -04:00
Tom Alexander
d3e6cd08a5 Temporarily disable the firewall for debugging. 2026-05-02 15:54:29 -04:00
Tom Alexander
c888055876 Enable gateway support. 2026-05-02 15:54:28 -04:00
Tom Alexander
650f8d41a6 Enable hubble. 2026-05-02 15:54:28 -04:00
Tom Alexander
346d15a1fe Temporarily drop flux interval to 1 minute during early development.
This is to reduce waiting time.
2026-05-02 15:54:28 -04:00
Tom Alexander
1133b5cbf2 Install deferred manifests. 2026-05-02 15:54:28 -04:00
Tom Alexander
b0abfe1ed6 Add a custom nftables firewall config. 2026-05-02 15:54:28 -04:00
Tom Alexander
0e959cb78f Enable the firewall.
Now that we have networking working, I can enable the firewall and confirm nothing breaks.
2026-05-02 15:54:28 -04:00
Tom Alexander
758f21d454 Fix CoreDNS IPv4 connectivity. 2026-05-02 15:54:28 -04:00
Tom Alexander
a9baed129b Increase timeout for coredns cache. 2026-05-02 15:54:27 -04:00
Tom Alexander
23cba83b96 More changes to try to fix coredns. 2026-05-02 15:54:27 -04:00
Tom Alexander
8ab03789fa Move the kubelet yaml config into nix. 2026-05-02 15:54:27 -04:00
Tom Alexander
7c33c06ce0 Implement a generic helm templater package. 2026-05-02 15:54:27 -04:00
Tom Alexander
cdb332e7fd Switch to generating the coredns manifests via nix. 2026-05-02 15:54:27 -04:00
Tom Alexander
6546edd82f Use CoreDNS for in-cluster DNS requests and caching. 2026-05-02 15:54:27 -04:00
Tom Alexander
5c445da492 Enable native routing. 2026-05-02 15:54:27 -04:00
Tom Alexander
58a2061c08 Build the cilium manifest automatically in nix. 2026-05-02 15:54:26 -04:00
Tom Alexander
b504dc4d66 Allow pods to directly speak to the public internet on their own public IPv6 addresses. 2026-05-02 15:54:26 -04:00
Tom Alexander
d1c7a0bfca Enable ipv4 and tunnel routing. 2026-05-02 15:54:26 -04:00
Tom Alexander
0b291d7648 Switch to kubernetes ipam mode. 2026-05-02 15:54:26 -04:00
Tom Alexander
8ae16e4bdf Fix service cluster ip range.
Kubernetes only allows a /112 for service ip range.
2026-05-02 15:54:26 -04:00
Tom Alexander
cfb92eb156 Fix trailing line break in kubernetes encryption config. 2026-05-02 15:54:26 -04:00
Tom Alexander
2e2e64715a Move the yaml functions to their own file. 2026-05-02 15:54:25 -04:00
Tom Alexander
8ff58c3c95 Introduce functions to generate yaml.
The toYAML function is just an alias to toJSON which is technically fine since YAML is a superset of JSON, but these new functions will generate actual YAML.
2026-05-02 15:54:25 -04:00
Tom Alexander
030f1c8504 Add missing cidr declarations. 2026-05-02 15:54:25 -04:00
Tom Alexander
1effb2830f Fix DNS resolution. 2026-05-02 15:54:25 -04:00
Tom Alexander
641adf9dd3 Apply the git repo to the cluster. 2026-05-02 15:54:25 -04:00
Tom Alexander
2997fd43ea Trust flux's ssh key in the yaml git repo. 2026-05-02 15:54:25 -04:00
Tom Alexander
063fcdbbab Generic secrets for ssh keys. 2026-05-02 15:54:25 -04:00
Tom Alexander
71d9f5672a Generic secrets for pgp keys. 2026-05-02 15:54:24 -04:00
Tom Alexander
7e3fa38af6 Generate kubernetes secrets for ssh keys. 2026-05-02 15:54:24 -04:00
Tom Alexander
3e13a3649a Install CoreDNS. 2026-05-02 15:54:24 -04:00
Tom Alexander
651a97d126 Generate pgp keys for sops. 2026-05-02 15:54:24 -04:00
Tom Alexander
cd313e673b Generate ssh keys for flux bootstrap. 2026-05-02 15:54:24 -04:00
Tom Alexander
cdac1cd091 Move the cluster bootstrap into the keys flake.
Bootstrapping the cluster needs access to secrets, so I am moving it into the keys flake.
2026-05-02 15:54:24 -04:00
Tom Alexander
fe35b4948a Set up flux. 2026-05-02 15:54:23 -04:00
Tom Alexander
90bbd30eee Add a bootstrap role. 2026-05-02 15:54:23 -04:00
Tom Alexander
9f9bf3fa81 Add a bootstrap role to load manifests into the cluster. 2026-05-02 15:54:23 -04:00
Tom Alexander
2f6ccd7f03 Fix launching of containers. 2026-05-02 15:54:23 -04:00
Tom Alexander
6ee80336ea Create a debugging role. 2026-05-02 15:54:23 -04:00
Tom Alexander
e6daf2c304 Some networking fixes. 2026-05-02 15:54:23 -04:00
Tom Alexander
a2899d38a2 Add cilium bootstrap. 2026-05-02 15:54:23 -04:00
Tom Alexander
ed77372b91 Installing the cni plugins. 2026-05-02 15:54:22 -04:00
Tom Alexander
3ccda1d4e5 Add kube-proxy. 2026-05-02 15:54:22 -04:00
Tom Alexander
27f4a78221 Add kubelet. 2026-05-02 15:54:22 -04:00
Tom Alexander
19971d2463 Add worker nodes. 2026-05-02 15:54:22 -04:00
Tom Alexander
5c58e30709 Add kube-scheduler. 2026-05-02 15:54:22 -04:00
Tom Alexander
efa1e3247a Add kube-controller-manager. 2026-05-02 15:54:22 -04:00
Tom Alexander
3e14efcceb Fix launching kube-apiserver. 2026-05-02 15:54:21 -04:00
Tom Alexander
edf6d40bf6 Move the encryption config into a package. 2026-05-02 15:54:21 -04:00
Tom Alexander
1606d569d0 Switch to generating certs with openssl. 2026-05-02 15:54:21 -04:00
Tom Alexander
771ec2e38a Add controller proxy certs. 2026-05-02 15:54:21 -04:00
Tom Alexander
b33bb736e6 Add requestheader-client-ca. 2026-05-02 15:54:21 -04:00
Tom Alexander
e8bd0f6416 Add service account. 2026-05-02 15:54:21 -04:00
Tom Alexander
514e67ac50 Install kubernetes. 2026-05-02 15:54:21 -04:00
Tom Alexander
c1c510e392 Add additional controllers. 2026-05-02 15:54:20 -04:00
Tom Alexander
f981bfff97 Add configs for a new kubernetes cluster on NixOS. 2026-05-02 15:54:20 -04:00
7 changed files with 41 additions and 212 deletions

View File

@@ -164,7 +164,7 @@
me.zsh.enable = true; me.zsh.enable = true;
me.sm64ex.enable = true; me.sm64ex.enable = true;
me.shipwright.enable = false; me.shipwright.enable = true;
me.ship2harkinian.enable = true; me.ship2harkinian.enable = true;
}; };
} }

View File

@@ -159,7 +159,7 @@
me.zsh.enable = true; me.zsh.enable = true;
me.sm64ex.enable = true; me.sm64ex.enable = true;
me.shipwright.enable = false; me.shipwright.enable = true;
me.ship2harkinian.enable = true; me.ship2harkinian.enable = true;
}; };
} }

View File

@@ -6,10 +6,10 @@ metadata:
name: flux-operator-web name: flux-operator-web
namespace: flux-system namespace: flux-system
labels: labels:
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
policyTypes: policyTypes:
@@ -32,10 +32,10 @@ metadata:
name: flux-operator name: flux-operator
namespace: flux-system namespace: flux-system
labels: labels:
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true automountServiceAccountToken: true
--- ---
@@ -44,14 +44,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.20.0 controller-gen.kubebuilder.io/version: v0.19.0
helm.sh/resource-policy: keep helm.sh/resource-policy: keep
labels: labels:
app.kubernetes.io/instance: 'flux-operator' app.kubernetes.io/instance: 'flux-operator'
app.kubernetes.io/managed-by: 'Helm' app.kubernetes.io/managed-by: 'Helm'
app.kubernetes.io/name: 'flux-operator' app.kubernetes.io/name: 'flux-operator'
app.kubernetes.io/version: 'v0.48.0' app.kubernetes.io/version: 'v0.37.1'
helm.sh/chart: 'flux-operator-0.48.0' helm.sh/chart: 'flux-operator-0.37.1'
name: fluxinstances.fluxcd.controlplane.io name: fluxinstances.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -205,11 +205,7 @@ spec:
components: components:
description: |- description: |-
Components is the list of controllers to install. Components is the list of controllers to install.
Defaults to the core Flux controllers: Defaults to a commonly used subset.
- source-controller
- kustomize-controller
- helm-controller
- notification-controller
items: items:
description: Component is the name of a controller to install. description: Component is the name of a controller to install.
enum: enum:
@@ -665,14 +661,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.20.0 controller-gen.kubebuilder.io/version: v0.19.0
helm.sh/resource-policy: keep helm.sh/resource-policy: keep
labels: labels:
app.kubernetes.io/instance: 'flux-operator' app.kubernetes.io/instance: 'flux-operator'
app.kubernetes.io/managed-by: 'Helm' app.kubernetes.io/managed-by: 'Helm'
app.kubernetes.io/name: 'flux-operator' app.kubernetes.io/name: 'flux-operator'
app.kubernetes.io/version: 'v0.48.0' app.kubernetes.io/version: 'v0.37.1'
helm.sh/chart: 'flux-operator-0.48.0' helm.sh/chart: 'flux-operator-0.37.1'
name: fluxreports.fluxcd.controlplane.io name: fluxreports.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -832,7 +828,7 @@ spec:
failing: failing:
description: |- description: |-
Failing is the number of reconciled Failing is the number of reconciled
resources in the Failing state and not Suspended. resources in the Failing state.
type: integer type: integer
running: running:
description: |- description: |-
@@ -969,14 +965,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.20.0 controller-gen.kubebuilder.io/version: v0.19.0
helm.sh/resource-policy: keep helm.sh/resource-policy: keep
labels: labels:
app.kubernetes.io/instance: 'flux-operator' app.kubernetes.io/instance: 'flux-operator'
app.kubernetes.io/managed-by: 'Helm' app.kubernetes.io/managed-by: 'Helm'
app.kubernetes.io/name: 'flux-operator' app.kubernetes.io/name: 'flux-operator'
app.kubernetes.io/version: 'v0.48.0' app.kubernetes.io/version: 'v0.37.1'
helm.sh/chart: 'flux-operator-0.48.0' helm.sh/chart: 'flux-operator-0.37.1'
name: resourcesetinputproviders.fluxcd.controlplane.io name: resourcesetinputproviders.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -1033,9 +1029,9 @@ spec:
- a PEM-encoded CA certificate (`ca.crt`) - a PEM-encoded CA certificate (`ca.crt`)
- a PEM-encoded client certificate (`tls.crt`) and private key (`tls.key`) - a PEM-encoded client certificate (`tls.crt`) and private key (`tls.key`)
When connecting to a Git, OCI, or ExternalService provider that uses self-signed certificates, When connecting to a Git or OCI provider that uses self-signed certificates, the CA certificate
the CA certificate must be set in the Secret under the 'ca.crt' key to establish the trust relationship. must be set in the Secret under the 'ca.crt' key to establish the trust relationship.
When connecting to a provider that supports client certificates (mTLS), the client certificate When connecting to an OCI provider that supports client certificates (mTLS), the client certificate
and private key must be set in the Secret under the 'tls.crt' and 'tls.key' keys, respectively. and private key must be set in the Secret under the 'tls.crt' and 'tls.key' keys, respectively.
properties: properties:
name: name:
@@ -1106,11 +1102,6 @@ spec:
Supported only for tags at the moment. Supported only for tags at the moment.
type: string type: string
type: object type: object
insecure:
description: |-
Insecure allows connecting to an ExternalService or OCIArtifactTag provider
over plain HTTP without TLS. When not set, the URL must use HTTPS.
type: boolean
schedule: schedule:
description: Schedule defines the schedules for the input provider description: Schedule defines the schedules for the input provider
to run. to run.
@@ -1138,16 +1129,13 @@ spec:
type: array type: array
secretRef: secretRef:
description: |- description: |-
SecretRef specifies the Kubernetes Secret containing the credentials SecretRef specifies the Kubernetes Secret containing the basic-auth credentials
to access the input provider. to access the input provider.
When connecting to a Git provider, the secret must contain the keys When connecting to a Git provider, the secret must contain the keys
'username' and 'password', and the password should be a personal access token 'username' and 'password', and the password should be a personal access token
that grants read-only access to the repository. that grants read-only access to the repository.
When connecting to an OCI provider, the secret must contain a Kubernetes When connecting to an OCI provider, the secret must contain a Kubernetes
Image Pull Secret, as if created by `kubectl create secret docker-registry`. Image Pull Secret, as if created by `kubectl create secret docker-registry`.
When connecting to an ExternalService provider, the secret must contain either
a 'token' key for bearer token authentication, or 'username' and 'password'
keys for basic authentication.
properties: properties:
name: name:
description: Name of the referent. description: Name of the referent.
@@ -1189,14 +1177,10 @@ spec:
- AzureDevOpsBranch - AzureDevOpsBranch
- AzureDevOpsTag - AzureDevOpsTag
- AzureDevOpsPullRequest - AzureDevOpsPullRequest
- GiteaBranch
- GiteaTag
- GiteaPullRequest
- OCIArtifactTag - OCIArtifactTag
- ACRArtifactTag - ACRArtifactTag
- ECRArtifactTag - ECRArtifactTag
- GARArtifactTag - GARArtifactTag
- ExternalService
type: string type: string
url: url:
description: |- description: |-
@@ -1222,16 +1206,6 @@ spec:
- message: spec.url must start with 'oci://' when spec.type is an OCI - message: spec.url must start with 'oci://' when spec.type is an OCI
provider provider
rule: '!self.type.endsWith(''ArtifactTag'') || self.url.startsWith(''oci'')' rule: '!self.type.endsWith(''ArtifactTag'') || self.url.startsWith(''oci'')'
- message: spec.url must start with 'http://' or 'https://' when spec.type
is 'ExternalService'
rule: self.type != 'ExternalService' || self.url.startsWith('http')
- message: spec.insecure can only be set when spec.type is 'ExternalService'
or 'OCIArtifactTag'
rule: '!has(self.insecure) || !self.insecure || self.type == ''ExternalService''
|| self.type == ''OCIArtifactTag'''
- message: spec.url must use 'https://' unless spec.insecure is true
rule: self.type != 'ExternalService' || !self.url.startsWith('http://')
|| (has(self.insecure) && self.insecure)
- message: cannot specify spec.serviceAccountName when spec.type is not - message: cannot specify spec.serviceAccountName when spec.type is not
one of AzureDevOps* or *ArtifactTag one of AzureDevOps* or *ArtifactTag
rule: '!has(self.serviceAccountName) || self.type.startsWith(''AzureDevOps'') rule: '!has(self.serviceAccountName) || self.type.startsWith(''AzureDevOps'')
@@ -1371,14 +1345,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.20.0 controller-gen.kubebuilder.io/version: v0.19.0
helm.sh/resource-policy: keep helm.sh/resource-policy: keep
labels: labels:
app.kubernetes.io/instance: 'flux-operator' app.kubernetes.io/instance: 'flux-operator'
app.kubernetes.io/managed-by: 'Helm' app.kubernetes.io/managed-by: 'Helm'
app.kubernetes.io/name: 'flux-operator' app.kubernetes.io/name: 'flux-operator'
app.kubernetes.io/version: 'v0.48.0' app.kubernetes.io/version: 'v0.37.1'
helm.sh/chart: 'flux-operator-0.48.0' helm.sh/chart: 'flux-operator-0.37.1'
name: resourcesets.fluxcd.controlplane.io name: resourcesets.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -1485,15 +1459,6 @@ spec:
input provider objects are used. Defaults to flattening all inputs input provider objects are used. Defaults to flattening all inputs
from all providers into a single list of input sets. from all providers into a single list of input sets.
properties: properties:
includeEmptyProviders:
description: |-
IncludeEmptyProviders controls how input providers that export no
inputs are treated. Only applies when Name is Permute. When true, if
any provider has zero inputs the resulting permutation set is empty
(mathematically correct Cartesian product behavior). When false or
unset (default), providers with zero inputs are silently skipped and
the remaining providers still permute among themselves.
type: boolean
name: name:
description: |- description: |-
Name defines how the inputs are combined when multiple Name defines how the inputs are combined when multiple
@@ -1516,9 +1481,6 @@ spec:
required: required:
- name - name
type: object type: object
x-kubernetes-validations:
- message: includeEmptyProviders only applies when name is Permute
rule: '!has(self.includeEmptyProviders) || self.name == ''Permute'''
inputs: inputs:
description: Inputs contains the list of ResourceSet inputs. description: Inputs contains the list of ResourceSet inputs.
items: items:
@@ -1697,16 +1659,6 @@ spec:
- type - type
type: object type: object
type: array type: array
externalChecksumRefs:
description: |-
ExternalChecksumRefs lists the ConfigMap and Secret references
discovered in checksumFrom annotations on the last reconciliation
that point to objects not rendered by this ResourceSet. Each entry
has the form "Kind/namespace/name". It is used to trigger a
reconciliation when one of the referenced objects changes.
items:
type: string
type: array
history: history:
description: |- description: |-
History contains the reconciliation history of the ResourceSet History contains the reconciliation history of the ResourceSet
@@ -1812,10 +1764,10 @@ metadata:
labels: labels:
rbac.authorization.k8s.io/aggregate-to-edit: "true" rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true" rbac.authorization.k8s.io/aggregate-to-admin: "true"
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@@ -1839,10 +1791,10 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-admin: "true" rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true" rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-view: "true" rbac.authorization.k8s.io/aggregate-to-view: "true"
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@@ -1855,86 +1807,16 @@ rules:
- list - list
- watch - watch
--- ---
# Source: flux-operator/templates/web-standard-roles.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: flux-web-user
labels:
helm.sh/chart: flux-operator-0.48.0
app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
# Source: flux-operator/templates/web-standard-roles.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: flux-web-admin
labels:
helm.sh/chart: flux-operator-0.48.0
app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch"]
- apiGroups:
- fluxcd.controlplane.io
- source.toolkit.fluxcd.io
- source.extensions.fluxcd.io
- kustomize.toolkit.fluxcd.io
- helm.toolkit.fluxcd.io
- image.toolkit.fluxcd.io
- notification.toolkit.fluxcd.io
resources: ["*"]
verbs:
- patch
- reconcile
- suspend
- resume
- download
- apiGroups:
- apps
resources:
- deployments
- statefulsets
- daemonsets
verbs:
- patch
- restart
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- create
- restart
- apiGroups:
- ""
resources:
- pods
verbs:
- delete
---
# Source: flux-operator/templates/admin-clusterrole.yaml # Source: flux-operator/templates/admin-clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
name: flux-operator name: flux-operator
labels: labels:
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
@@ -1952,10 +1834,10 @@ metadata:
name: flux-operator name: flux-operator
namespace: flux-system namespace: flux-system
labels: labels:
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
ports: ports:
@@ -1978,10 +1860,10 @@ metadata:
name: flux-operator name: flux-operator
namespace: flux-system namespace: flux-system
labels: labels:
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
selector: selector:
@@ -1995,10 +1877,10 @@ spec:
prometheus.io/port: "8080" prometheus.io/port: "8080"
prometheus.io/path: "/metrics" prometheus.io/path: "/metrics"
labels: labels:
helm.sh/chart: flux-operator-0.48.0 helm.sh/chart: flux-operator-0.37.1
app.kubernetes.io/name: flux-operator app.kubernetes.io/name: flux-operator
app.kubernetes.io/instance: flux-operator app.kubernetes.io/instance: flux-operator
app.kubernetes.io/version: "v0.48.0" app.kubernetes.io/version: "v0.37.1"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
serviceAccountName: flux-operator serviceAccountName: flux-operator
@@ -2024,7 +1906,7 @@ spec:
runAsNonRoot: true runAsNonRoot: true
seccompProfile: seccompProfile:
type: RuntimeDefault type: RuntimeDefault
image: "ghcr.io/controlplaneio-fluxcd/flux-operator:v0.48.0" image: "ghcr.io/controlplaneio-fluxcd/flux-operator:v0.37.1"
imagePullPolicy: "IfNotPresent" imagePullPolicy: "IfNotPresent"
ports: ports:
- name: http-metrics - name: http-metrics

View File

@@ -5,13 +5,5 @@ metadata:
namespace: flux-system namespace: flux-system
spec: spec:
distribution: distribution:
version: "2.8.x" version: "2.7.x"
registry: "ghcr.io/fluxcd" registry: "ghcr.io/fluxcd"
components:
- source-controller
- kustomize-controller
- helm-controller
- notification-controller
- image-automation-controller
- image-reflector-controller
# - source-watcher

View File

@@ -35,10 +35,6 @@ let
"${k8s.cilium-manifest}/cilium.yaml" "${k8s.cilium-manifest}/cilium.yaml"
"${k8s.coredns-manifest}/coredns.yaml" "${k8s.coredns-manifest}/coredns.yaml"
./files/manifests/flux_namespace.yaml ./files/manifests/flux_namespace.yaml
#
# Generate with: helm template --dry-run=server flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator --namespace flux-system --create-namespace
#
./files/manifests/flux.yaml ./files/manifests/flux.yaml
./files/manifests/flux_instance.yaml ./files/manifests/flux_instance.yaml
] ]

View File

@@ -120,7 +120,7 @@ extendedKeyUsage = clientAuth, serverAuth
keyUsage = critical, digitalSignature, keyEncipherment keyUsage = critical, digitalSignature, keyEncipherment
nsCertType = client nsCertType = client
nsComment = "worker0 Certificate" nsComment = "worker0 Certificate"
subjectAltName = DNS:worker0, IP:127.0.0.1, IP:10.215.1.224, IP:2620:11f:7001:7:ffff:ffff:ad7:1e0 subjectAltName = DNS:worker0, IP:127.0.0.1
subjectKeyIdentifier = hash subjectKeyIdentifier = hash
[worker0_distinguished_name] [worker0_distinguished_name]
@@ -141,7 +141,7 @@ extendedKeyUsage = clientAuth, serverAuth
keyUsage = critical, digitalSignature, keyEncipherment keyUsage = critical, digitalSignature, keyEncipherment
nsCertType = client nsCertType = client
nsComment = "worker1 Certificate" nsComment = "worker1 Certificate"
subjectAltName = DNS:worker1, IP:127.0.0.1, IP:10.215.1.225, IP:2620:11f:7001:7:ffff:ffff:ad7:1e1 subjectAltName = DNS:worker1, IP:127.0.0.1
subjectKeyIdentifier = hash subjectKeyIdentifier = hash
[worker1_distinguished_name] [worker1_distinguished_name]
@@ -162,7 +162,7 @@ extendedKeyUsage = clientAuth, serverAuth
keyUsage = critical, digitalSignature, keyEncipherment keyUsage = critical, digitalSignature, keyEncipherment
nsCertType = client nsCertType = client
nsComment = "worker2 Certificate" nsComment = "worker2 Certificate"
subjectAltName = DNS:worker2, IP:127.0.0.1, IP:10.215.1.226, IP:2620:11f:7001:7:ffff:ffff:ad7:1e2 subjectAltName = DNS:worker2, IP:127.0.0.1
subjectKeyIdentifier = hash subjectKeyIdentifier = hash
[worker2_distinguished_name] [worker2_distinguished_name]

View File

@@ -58,25 +58,9 @@ let
}; };
}; };
"flux-system" = { "flux-system" = {
"registry-credentials" =
(generate_docker_secret {
username = builtins.readFile "${./secrets/flux-system/registry-credentials/username}";
password = builtins.readFile "${./secrets/flux-system/registry-credentials/password}";
email = builtins.readFile "${./secrets/flux-system/registry-credentials/email}";
})
// {
# "__annotations" = {
# "tekton.dev/docker-0" = "https://harbor.fizz.buzz";
# };
};
"webhook-token" = { "webhook-token" = {
# This token is used for gitea webhooks
"token" = generate_key 64 "flux-system.webhook-token.token"; "token" = generate_key 64 "flux-system.webhook-token.token";
}; };
"harbor-webhook-token" = {
# This token is used for harbor webhooks
"token" = generate_key 64 "flux-system.harbor-webhook-token.token";
};
}; };
"gitea" = { "gitea" = {
"gitea-env" = { "gitea-env" = {
@@ -100,9 +84,6 @@ let
); );
}; };
}; };
"homepage-staging" = {
"oauth2-env" = oauth2_env { dex_id = "homepage-staging"; };
};
"tekton-gateway" = { "tekton-gateway" = {
"oauth2-env" = oauth2_env { dex_id = "tekton"; }; "oauth2-env" = oauth2_env { dex_id = "tekton"; };
}; };
@@ -119,12 +100,6 @@ let
"ssh-privatekey" = (builtins.readFile "${./secrets/webhook-bridge/deployer-key/ssh-privatekey}"); "ssh-privatekey" = (builtins.readFile "${./secrets/webhook-bridge/deployer-key/ssh-privatekey}");
"ssh-publickey" = (builtins.readFile "${./secrets/webhook-bridge/deployer-key/ssh-publickey}"); "ssh-publickey" = (builtins.readFile "${./secrets/webhook-bridge/deployer-key/ssh-publickey}");
}; };
"gitea" = {
"token" = (builtins.readFile "${./secrets/webhook-bridge/gitea/token}");
};
"harbor-plain" = {
"config.json" = (builtins.readFile "${./secrets/webhook-bridge/harbor-plain/config.json}");
};
}; };
}; };
encrypted_secrets = ( encrypted_secrets = (
@@ -159,7 +134,6 @@ let
## Utilities ## Utilities
inherit ((import ../../../functions/to_yaml.nix) { inherit pkgs; }) to_yaml; inherit ((import ../../../functions/to_yaml.nix) { inherit pkgs; }) to_yaml;
inherit (pkgs.callPackage ../../contrib/base64/package.nix { inherit lib; }) toBase64;
generate_key = generate_key =
len: name: len: name:
builtins.readFile ( builtins.readFile (
@@ -194,21 +168,6 @@ let
"\\}" "\\}"
] ]
json; json;
generate_docker_secret =
{
username,
password,
email,
}:
let
in
{
"__type" = "kubernetes.io/dockerconfigjson";
".dockerconfigjson" = builtins.toJSON {
inherit username password email;
"auth" = toBase64 "${username}:${password}";
};
};
## dex ## dex
get_dex_config = get_dex_config =
client_id: client_id: