80 Commits

Author SHA1 Message Date
Tom Alexander
e900dc4199 Add secret for homepage-staging. 2026-05-05 22:43:45 -04:00
Tom Alexander
df2299d214 Add a secret for the harbor webhooks to flux. 2026-05-05 22:43:45 -04:00
Tom Alexander
8f0a273ee3 Update flux and install the image automation controller. 2026-05-05 22:43:45 -04:00
Tom Alexander
2a41b6c16e Add IP addresses to worker certs for the metrics server. 2026-05-05 22:43:45 -04:00
Tom Alexander
e537825c54 Delete images after 24 hours of being unused. 2026-05-05 22:43:45 -04:00
Tom Alexander
6c4075e279 Set up containerd use harbor.fizz.buzz. 2026-05-05 22:43:44 -04:00
Tom Alexander
785f28a351 Add secrets for archive-box, webhook-bridge, and tekton. 2026-05-05 22:43:44 -04:00
Tom Alexander
5cfb2c3b6a Allow node-to-node communication. 2026-05-05 22:43:44 -04:00
Tom Alexander
2fdf0a0f63 Use numbers for folder order. 2026-05-05 22:43:44 -04:00
Tom Alexander
d7c889a2d7 Add harbor secrets. 2026-05-05 22:43:44 -04:00
Tom Alexander
d2c01c1223 Switch to the experimental gateway CRDs for TCPRoute support. 2026-05-05 22:43:44 -04:00
Tom Alexander
f62f6bed00 Add oauth2 proxy secrets. 2026-05-05 22:43:43 -04:00
Tom Alexander
efc4d0f12e Add dex secrets. 2026-05-05 22:43:43 -04:00
Tom Alexander
f0e539f5ef Enable the firewall. 2026-05-05 22:43:43 -04:00
Tom Alexander
abd795d8ae Add gitea secrets. 2026-05-05 22:43:43 -04:00
Tom Alexander
2d3c03e042 Add generation for in-repo secrets. 2026-05-05 22:43:43 -04:00
Tom Alexander
a44e972701 Enforce cilium network policies. 2026-05-05 22:43:43 -04:00
Tom Alexander
7619c482ef Downgrade to gateway 1.4.1.
1.5 came out recently, so no gateway providers support it.
2026-05-05 22:43:42 -04:00
Tom Alexander
3ea1b59d59 Update packages in kubernetes/keys. 2026-05-05 22:43:42 -04:00
Tom Alexander
4457d35a63 Fix network for updated nix. 2026-05-05 22:43:42 -04:00
Tom Alexander
dddf80273a Fix proxy auth tls 2026-05-05 22:43:42 -04:00
Tom Alexander
9751784e76 Generate certificates for the aggregation layer. 2026-05-05 22:43:42 -04:00
Tom Alexander
1195bf2aa5 Add a note for the cilium connectivity test. 2026-05-05 22:43:42 -04:00
Tom Alexander
b6b5d5bd0f Temporarily disable the firewall for debugging. 2026-05-05 22:43:41 -04:00
Tom Alexander
893922959a Enable gateway support. 2026-05-05 22:43:41 -04:00
Tom Alexander
1fc4dd8f72 Enable hubble. 2026-05-05 22:43:41 -04:00
Tom Alexander
4b1a5c56ab Temporarily drop flux interval to 1 minute during early development.
This is to reduce waiting time.
2026-05-05 22:43:41 -04:00
Tom Alexander
af478c9731 Install deferred manifests. 2026-05-05 22:43:41 -04:00
Tom Alexander
81e9386b9b Add a custom nftables firewall config. 2026-05-05 22:43:41 -04:00
Tom Alexander
c89b5031c7 Enable the firewall.
Now that we have networking working, I can enable the firewall and confirm nothing breaks.
2026-05-05 22:43:41 -04:00
Tom Alexander
9378bc3343 Fix CoreDNS IPv4 connectivity. 2026-05-05 22:43:40 -04:00
Tom Alexander
61cd0acc5e Increase timeout for coredns cache. 2026-05-05 22:43:40 -04:00
Tom Alexander
646fc44d8f More changes to try to fix coredns. 2026-05-05 22:43:40 -04:00
Tom Alexander
5d094246de Move the kubelet yaml config into nix. 2026-05-05 22:43:40 -04:00
Tom Alexander
8158b06e2d Implement a generic helm templater package. 2026-05-05 22:43:40 -04:00
Tom Alexander
423d429d0e Switch to generating the coredns manifests via nix. 2026-05-05 22:43:40 -04:00
Tom Alexander
de5f2ec54d Use CoreDNS for in-cluster DNS requests and caching. 2026-05-05 22:43:39 -04:00
Tom Alexander
5871c72491 Enable native routing. 2026-05-05 22:43:39 -04:00
Tom Alexander
ab179f2f49 Build the cilium manifest automatically in nix. 2026-05-05 22:43:39 -04:00
Tom Alexander
91cfb2a9c4 Allow pods to directly speak to the public internet on their own public IPv6 addresses. 2026-05-05 22:43:39 -04:00
Tom Alexander
dfd43da93a Enable ipv4 and tunnel routing. 2026-05-05 22:43:39 -04:00
Tom Alexander
8a54291834 Switch to kubernetes ipam mode. 2026-05-05 22:43:39 -04:00
Tom Alexander
ed786cf926 Fix service cluster ip range.
Kubernetes only allows a /112 for service ip range.
2026-05-05 22:43:38 -04:00
Tom Alexander
0f09d38212 Fix trailing line break in kubernetes encryption config. 2026-05-05 22:43:38 -04:00
Tom Alexander
0215812ee9 Move the yaml functions to their own file. 2026-05-05 22:43:38 -04:00
Tom Alexander
d26b3d5ebf 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-05 22:43:38 -04:00
Tom Alexander
2861fddf6f Add missing cidr declarations. 2026-05-05 22:43:38 -04:00
Tom Alexander
0e8393762d Fix DNS resolution. 2026-05-05 22:43:38 -04:00
Tom Alexander
45cc48b3b5 Apply the git repo to the cluster. 2026-05-05 22:43:38 -04:00
Tom Alexander
0a112a931a Trust flux's ssh key in the yaml git repo. 2026-05-05 22:43:37 -04:00
Tom Alexander
3b3f27bd59 Generic secrets for ssh keys. 2026-05-05 22:43:37 -04:00
Tom Alexander
f19d018a34 Generic secrets for pgp keys. 2026-05-05 22:43:37 -04:00
Tom Alexander
d277ca5634 Generate kubernetes secrets for ssh keys. 2026-05-05 22:43:37 -04:00
Tom Alexander
1f02259850 Install CoreDNS. 2026-05-05 22:43:37 -04:00
Tom Alexander
9382057b47 Generate pgp keys for sops. 2026-05-05 22:43:37 -04:00
Tom Alexander
586198586b Generate ssh keys for flux bootstrap. 2026-05-05 22:43:36 -04:00
Tom Alexander
2efe37993a 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-05 22:43:36 -04:00
Tom Alexander
61583f9eff Set up flux. 2026-05-05 22:43:36 -04:00
Tom Alexander
54782da612 Add a bootstrap role. 2026-05-05 22:43:36 -04:00
Tom Alexander
4d499c0210 Add a bootstrap role to load manifests into the cluster. 2026-05-05 22:43:36 -04:00
Tom Alexander
365566bf75 Fix launching of containers. 2026-05-05 22:43:36 -04:00
Tom Alexander
37de518169 Create a debugging role. 2026-05-05 22:43:35 -04:00
Tom Alexander
2bd134ab12 Some networking fixes. 2026-05-05 22:43:35 -04:00
Tom Alexander
827ef15c90 Add cilium bootstrap. 2026-05-05 22:43:35 -04:00
Tom Alexander
f7d463947d Installing the cni plugins. 2026-05-05 22:43:35 -04:00
Tom Alexander
a389547117 Add kube-proxy. 2026-05-05 22:43:35 -04:00
Tom Alexander
3cb65e76c0 Add kubelet. 2026-05-05 22:43:35 -04:00
Tom Alexander
6c05320380 Add worker nodes. 2026-05-05 22:43:34 -04:00
Tom Alexander
d302ac96e2 Add kube-scheduler. 2026-05-05 22:43:34 -04:00
Tom Alexander
23ee194a84 Add kube-controller-manager. 2026-05-05 22:43:34 -04:00
Tom Alexander
0e111b500b Fix launching kube-apiserver. 2026-05-05 22:43:34 -04:00
Tom Alexander
df9f526f9e Move the encryption config into a package. 2026-05-05 22:43:34 -04:00
Tom Alexander
d8b7319348 Switch to generating certs with openssl. 2026-05-05 22:43:34 -04:00
Tom Alexander
2ac3cff2a1 Add controller proxy certs. 2026-05-05 22:43:33 -04:00
Tom Alexander
f31260eb00 Add requestheader-client-ca. 2026-05-05 22:43:33 -04:00
Tom Alexander
38f6d3abf9 Add service account. 2026-05-05 22:43:33 -04:00
Tom Alexander
2522803300 Install kubernetes. 2026-05-05 22:43:33 -04:00
Tom Alexander
f8a40ca20e Add additional controllers. 2026-05-05 22:43:33 -04:00
Tom Alexander
9fc2e682f4 Add configs for a new kubernetes cluster on NixOS. 2026-05-05 22:43:32 -04:00
Tom Alexander
9a9268f8cc Disable shipwright.
The hash is not matching, so the build is broken.
2026-05-05 22:42:17 -04:00
7 changed files with 212 additions and 41 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 = true; me.shipwright.enable = false;
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 = true; me.shipwright.enable = false;
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.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
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.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
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.19.0 controller-gen.kubebuilder.io/version: v0.20.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.37.1' app.kubernetes.io/version: 'v0.48.0'
helm.sh/chart: 'flux-operator-0.37.1' helm.sh/chart: 'flux-operator-0.48.0'
name: fluxinstances.fluxcd.controlplane.io name: fluxinstances.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -205,7 +205,11 @@ spec:
components: components:
description: |- description: |-
Components is the list of controllers to install. Components is the list of controllers to install.
Defaults to a commonly used subset. Defaults to the core Flux controllers:
- 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:
@@ -661,14 +665,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.19.0 controller-gen.kubebuilder.io/version: v0.20.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.37.1' app.kubernetes.io/version: 'v0.48.0'
helm.sh/chart: 'flux-operator-0.37.1' helm.sh/chart: 'flux-operator-0.48.0'
name: fluxreports.fluxcd.controlplane.io name: fluxreports.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -828,7 +832,7 @@ spec:
failing: failing:
description: |- description: |-
Failing is the number of reconciled Failing is the number of reconciled
resources in the Failing state. resources in the Failing state and not Suspended.
type: integer type: integer
running: running:
description: |- description: |-
@@ -965,14 +969,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.19.0 controller-gen.kubebuilder.io/version: v0.20.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.37.1' app.kubernetes.io/version: 'v0.48.0'
helm.sh/chart: 'flux-operator-0.37.1' helm.sh/chart: 'flux-operator-0.48.0'
name: resourcesetinputproviders.fluxcd.controlplane.io name: resourcesetinputproviders.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -1029,9 +1033,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 or OCI provider that uses self-signed certificates, the CA certificate When connecting to a Git, OCI, or ExternalService provider that uses self-signed certificates,
must be set in the Secret under the 'ca.crt' key to establish the trust relationship. the CA certificate must be set in the Secret under the 'ca.crt' key to establish the trust relationship.
When connecting to an OCI provider that supports client certificates (mTLS), the client certificate When connecting to a 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:
@@ -1102,6 +1106,11 @@ 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.
@@ -1129,13 +1138,16 @@ spec:
type: array type: array
secretRef: secretRef:
description: |- description: |-
SecretRef specifies the Kubernetes Secret containing the basic-auth credentials SecretRef specifies the Kubernetes Secret containing the 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.
@@ -1177,10 +1189,14 @@ 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: |-
@@ -1206,6 +1222,16 @@ 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'')
@@ -1345,14 +1371,14 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.19.0 controller-gen.kubebuilder.io/version: v0.20.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.37.1' app.kubernetes.io/version: 'v0.48.0'
helm.sh/chart: 'flux-operator-0.37.1' helm.sh/chart: 'flux-operator-0.48.0'
name: resourcesets.fluxcd.controlplane.io name: resourcesets.fluxcd.controlplane.io
spec: spec:
group: fluxcd.controlplane.io group: fluxcd.controlplane.io
@@ -1459,6 +1485,15 @@ 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
@@ -1481,6 +1516,9 @@ 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:
@@ -1659,6 +1697,16 @@ 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
@@ -1764,10 +1812,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.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@@ -1791,10 +1839,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.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@@ -1807,16 +1855,86 @@ 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.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
@@ -1834,10 +1952,10 @@ metadata:
name: flux-operator name: flux-operator
namespace: flux-system namespace: flux-system
labels: labels:
helm.sh/chart: flux-operator-0.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
ports: ports:
@@ -1860,10 +1978,10 @@ metadata:
name: flux-operator name: flux-operator
namespace: flux-system namespace: flux-system
labels: labels:
helm.sh/chart: flux-operator-0.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
selector: selector:
@@ -1877,10 +1995,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.37.1 helm.sh/chart: flux-operator-0.48.0
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.37.1" app.kubernetes.io/version: "v0.48.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
serviceAccountName: flux-operator serviceAccountName: flux-operator
@@ -1906,7 +2024,7 @@ spec:
runAsNonRoot: true runAsNonRoot: true
seccompProfile: seccompProfile:
type: RuntimeDefault type: RuntimeDefault
image: "ghcr.io/controlplaneio-fluxcd/flux-operator:v0.37.1" image: "ghcr.io/controlplaneio-fluxcd/flux-operator:v0.48.0"
imagePullPolicy: "IfNotPresent" imagePullPolicy: "IfNotPresent"
ports: ports:
- name: http-metrics - name: http-metrics

View File

@@ -5,5 +5,13 @@ metadata:
namespace: flux-system namespace: flux-system
spec: spec:
distribution: distribution:
version: "2.7.x" version: "2.8.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,6 +35,10 @@ 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 subjectAltName = DNS:worker0, IP:127.0.0.1, IP:10.215.1.224, IP:2620:11f:7001:7:ffff:ffff:ad7:1e0
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 subjectAltName = DNS:worker1, IP:127.0.0.1, IP:10.215.1.225, IP:2620:11f:7001:7:ffff:ffff:ad7:1e1
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 subjectAltName = DNS:worker2, IP:127.0.0.1, IP:10.215.1.226, IP:2620:11f:7001:7:ffff:ffff:ad7:1e2
subjectKeyIdentifier = hash subjectKeyIdentifier = hash
[worker2_distinguished_name] [worker2_distinguished_name]

View File

@@ -58,9 +58,25 @@ 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" = {
@@ -84,6 +100,9 @@ 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"; };
}; };
@@ -100,6 +119,12 @@ 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 = (
@@ -134,6 +159,7 @@ 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 (
@@ -168,6 +194,21 @@ 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: