Skip to content

Commit cf7c4ab

Browse files
authored
Merge pull request #379 from containeroo/CO-71
Allow externally managed DNS records
2 parents 703d7fe + 6aa6d70 commit cf7c4ab

32 files changed

+128
-349
lines changed

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
632632
the "copyright" line and a pointer to where the full notice is found.
633633

634634
cloudflare-operator: Manage Cloudflare DNS records with Kubernetes objects.
635-
Copyright (C) 2024 containeroo
635+
Copyright (C) 2025 containeroo
636636

637637
This program is free software: you can redistribute it and/or modify
638638
it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
652652
If the program does terminal interaction, make it output a short
653653
notice like this when it starts in an interactive mode:
654654

655-
cloudflare-operator Copyright (C) 2024 containeroo
655+
cloudflare-operator Copyright (C) 2025 containeroo
656656
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657657
This is free software, and you are welcome to redistribute it
658658
under certain conditions; type `show c' for details.

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# To re-generate a bundle for another specific version without changing the standard setup, you can:
44
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
6-
VERSION ?= 1.3.1
6+
VERSION ?= 1.4.0
77

88
# CHANNELS define the bundle channels used in the bundle.
99
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
@@ -48,12 +48,12 @@ endif
4848

4949
# Set the Operator SDK version to use. By default, what is installed on the system is used.
5050
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51-
OPERATOR_SDK_VERSION ?= v1.34.2
51+
OPERATOR_SDK_VERSION ?= v1.39.1
5252

5353
# Image URL to use all building/pushing image targets
5454
IMG ?= controller:latest
5555
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
56-
ENVTEST_K8S_VERSION = 1.30.1
56+
ENVTEST_K8S_VERSION = 1.32.0
5757

5858
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
5959
ifeq (,$(shell go env GOBIN))
@@ -121,7 +121,7 @@ test-e2e:
121121
go test ./test/e2e/ -v -ginkgo.v
122122

123123
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
124-
GOLANGCI_LINT_VERSION ?= v1.54.2
124+
GOLANGCI_LINT_VERSION ?= v1.63.4
125125
golangci-lint:
126126
@[ -f $(GOLANGCI_LINT) ] || { \
127127
set -e ;\
@@ -213,8 +213,8 @@ GEN_CRD_API_REFERENCE_DOCS ?= $(LOCALBIN)/gen-crd-api-reference-docs
213213
GEN_API_REF_DOCS_VERSION ?= f2b6666352402b0f00e81881f7f60b056a02f0e2
214214

215215
## Tool Versions
216-
KUSTOMIZE_VERSION ?= v5.2.1
217-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
216+
KUSTOMIZE_VERSION ?= v5.6.0
217+
CONTROLLER_TOOLS_VERSION ?= v0.17.1
218218

219219
.PHONY: kustomize
220220
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.

api/v1/account_types.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -35,27 +35,17 @@ type AccountSpec struct {
3535
// +optional
3636
Interval metav1.Duration `json:"interval,omitempty"`
3737
// List of zone names that should be managed by cloudflare-operator
38+
// Deprecated and will be removed in a future release
3839
// +optional
40+
// +deprecated
3941
ManagedZones []string `json:"managedZones,omitempty"`
4042
}
4143

42-
type AccountStatusZones struct {
43-
// Name of the zone
44-
// +optional
45-
Name string `json:"name,omitempty"`
46-
// ID of the zone
47-
// +optional
48-
ID string `json:"id,omitempty"`
49-
}
50-
5144
// AccountStatus defines the observed state of Account
5245
type AccountStatus struct {
5346
// Conditions contains the different condition statuses for the Account object.
5447
// +optional
5548
Conditions []metav1.Condition `json:"conditions"`
56-
// Zones contains all the zones of the Account
57-
// +optional
58-
Zones []AccountStatusZones `json:"zones,omitempty"`
5949
}
6050

6151
// +kubebuilder:object:root=true

api/v1/dnsrecord_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

api/v1/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

api/v1/groupversion_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

api/v1/ip_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

api/v1/zone_types.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -24,8 +24,10 @@ import (
2424
type ZoneSpec struct {
2525
// Name of the zone
2626
Name string `json:"name"`
27-
// ID of the zone
28-
ID string `json:"id"`
27+
// Prune determines whether DNS records in the zone that are not managed by Kubernetes should be automatically removed
28+
// +kubebuilder:default=true
29+
// +optional
30+
Prune bool `json:"prune"`
2931
// Interval to check zone status
3032
// +kubebuilder:default="5m"
3133
// +optional
@@ -34,6 +36,9 @@ type ZoneSpec struct {
3436

3537
// ZoneStatus defines the observed state of Zone
3638
type ZoneStatus struct {
39+
// ID of the zone
40+
// +optional
41+
ID string `json:"id,omitempty"`
3742
// Conditions contains the different condition statuses for the Zone object.
3843
// +optional
3944
Conditions []metav1.Condition `json:"conditions"`
@@ -45,7 +50,7 @@ type ZoneStatus struct {
4550

4651
// Zone is the Schema for the zones API
4752
// +kubebuilder:printcolumn:name="Zone Name",type="string",JSONPath=".spec.name"
48-
// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".spec.id"
53+
// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id"
4954
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.conditions[?(@.type == "Ready")].status`
5055
type Zone struct {
5156
metav1.TypeMeta `json:",inline"`

api/v1/zz_generated.deepcopy.go

Lines changed: 1 addition & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 containeroo
2+
Copyright 2025 containeroo
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)