-
-
Notifications
You must be signed in to change notification settings - Fork 64
Feat/helm charts #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/helm charts #182
Changes from all commits
0e0a016
8f14ade
0731751
6c85d3e
099ef3f
074bd24
a18b275
c5d8dbd
5abde25
4217dcc
d55cc2d
753237c
a8f1422
6b0703e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| version: "2" | ||
|
|
||
| run: | ||
| go: '1.24' | ||
| go: '1.26' | ||
| timeout: 5m | ||
| allow-parallel-runners: true | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # Build the manager binary | ||
| FROM golang:1.24 AS builder | ||
| FROM golang:1.26 AS builder | ||
| ARG TARGETOS | ||
| ARG TARGETARCH | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,9 +95,17 @@ help: ## Display this help. | |
| ##@ Development | ||
|
|
||
| .PHONY: manifests | ||
| manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. | ||
| manifests: controller-gen helm-sync-crds helm-sync-versions ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. | ||
| $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases | ||
|
|
||
| .PHONY: helm-sync-crds | ||
| helm-sync-crds: ## Sync CRD YAMLs from config/crd/bases into charts/cloudflare-operator/crds/ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. possibly I missed it, but we'll want some kind of CI time check to ensure that this has been run. something that runs the makefile command, and asserts that doing so doesn't produce a diff
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added a step to the lint workflow that should do this and give a helpful message if it fails |
||
| cp config/crd/bases/*.yaml charts/cloudflare-operator/crds/ | ||
|
|
||
| .PHONY: helm-sync-versions | ||
| helm-sync-versions: ## Sync appVersion in charts/cloudflare-operator/Chart.yaml from VERSION | ||
| sed -i "s/^appVersion:.*/appVersion: \"$(VERSION)\"/" charts/cloudflare-operator/Chart.yaml | ||
|
|
||
| .PHONY: generate | ||
| generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. | ||
| $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." | ||
|
|
@@ -215,7 +223,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint | |
|
|
||
| ## Tool Versions | ||
| KUSTOMIZE_VERSION ?= v5.4.3 | ||
| CONTROLLER_TOOLS_VERSION ?= v0.16.1 | ||
| CONTROLLER_TOOLS_VERSION ?= v0.21.0 | ||
| ENVTEST_VERSION ?= release-0.19 | ||
| GOLANGCI_LINT_VERSION ?= v2.1.5 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| .DS_Store | ||
| *.tgz | ||
| .git/ | ||
| .gitignore |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apiVersion: v2 | ||
| name: cloudflare-operator | ||
| description: > | ||
| Helm chart for the Cloudflare Operator controller manager. | ||
| Installs the controller Deployment, CRDs, RBAC, and ServiceAccount | ||
| required to manage Cloudflare Tunnels via Kubernetes custom resources. | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "0.13.1" | ||
| keywords: | ||
| - cloudflare | ||
| - tunnel | ||
| - operator | ||
| home: https://github.com/adyanth/cloudflare-operator | ||
| sources: | ||
| - https://github.com/adyanth/cloudflare-operator | ||
| maintainers: | ||
| - name: adyanth | ||
| url: https://github.com/adyanth |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. something just occurred to me, could these be symlinks? |
||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| controller-gen.kubebuilder.io/version: v0.21.0 | ||
| name: accesstunnels.networking.cfargotunnel.com | ||
| spec: | ||
| group: networking.cfargotunnel.com | ||
| names: | ||
| kind: AccessTunnel | ||
| listKind: AccessTunnelList | ||
| plural: accesstunnels | ||
| singular: accesstunnel | ||
| scope: Namespaced | ||
| versions: | ||
| - additionalPrinterColumns: | ||
| - jsonPath: .target.fqdn | ||
| name: Target | ||
| type: string | ||
| name: v1alpha1 | ||
| schema: | ||
| openAPIV3Schema: | ||
| description: AccessTunnel is the Schema for the accesstunnels API | ||
| properties: | ||
| apiVersion: | ||
| description: |- | ||
| APIVersion defines the versioned schema of this representation of an object. | ||
| Servers should convert recognized schemas to the latest internal value, and | ||
| may reject unrecognized values. | ||
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
| type: string | ||
| kind: | ||
| description: |- | ||
| Kind is a string value representing the REST resource this object represents. | ||
| Servers may infer this from the endpoint the client submits requests to. | ||
| Cannot be updated. | ||
| In CamelCase. | ||
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
| type: string | ||
| metadata: | ||
| type: object | ||
| serviceToken: | ||
| description: AccessTunnelServiceToken defines the access auth if needed | ||
| properties: | ||
| CLOUDFLARE_ACCESS_SERVICE_TOKEN_ID: | ||
| default: CLOUDFLARE_ACCESS_SERVICE_TOKEN_ID | ||
| description: Key in the secret to use for Access Service Token ID, | ||
| defaults to CLOUDFLARE_ACCESS_SERVICE_TOKEN_ID | ||
| type: string | ||
| CLOUDFLARE_ACCESS_SERVICE_TOKEN_TOKEN: | ||
| default: CLOUDFLARE_ACCESS_SERVICE_TOKEN_TOKEN | ||
| description: Key in the secret to use for Access Service Token Token, | ||
| defaults to CLOUDFLARE_ACCESS_SERVICE_TOKEN_TOKEN | ||
| type: string | ||
| secretRef: | ||
| description: Access Service Token Secret | ||
| type: string | ||
| required: | ||
| - secretRef | ||
| type: object | ||
| status: | ||
| description: AccessTunnelStatus defines the observed state of Access | ||
| type: object | ||
| target: | ||
| description: AccessTunnelTarget defines the desired state of Access | ||
| properties: | ||
| fqdn: | ||
| description: |- | ||
| Fqdn specifies the DNS name to access | ||
| This is not validated and used as provided | ||
| type: string | ||
| image: | ||
| default: cloudflare/cloudflared:2025.4.0 | ||
| description: cloudflared image to use | ||
| type: string | ||
| protocol: | ||
| default: tcp | ||
| description: Protocol to forward, better to use TCP? | ||
| enum: | ||
| - tcp | ||
| - rdp | ||
| - smb | ||
| - ssh | ||
| type: string | ||
| svc: | ||
| description: Service Config | ||
| properties: | ||
| name: | ||
| description: |- | ||
| Name of the new service to create | ||
| Defaults to the name of the Access object | ||
| type: string | ||
| port: | ||
| default: 8000 | ||
| description: |- | ||
| Service port to expose with | ||
| Defaults to 8000 | ||
| format: int32 | ||
| maximum: 65535 | ||
| minimum: 1 | ||
| type: integer | ||
| type: object | ||
| required: | ||
| - fqdn | ||
| type: object | ||
| type: object | ||
| served: true | ||
| storage: true | ||
| subresources: | ||
| status: {} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appreciate you didn't set this up but it would produce meaningful security guarantees if we switch to a hash for actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✔️ I'll disclaim though that there's a lot of them so I let Claude do these updates for me. All seems to be working though.