Skip to content
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

Medusa bucket secret label #1262

Merged
merged 21 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2af7407
Add hash functions.
Miles-Garnsey Mar 27, 2024
e6ff5c3
Ensure that a Medusa StorageSecretRef always gets labelled with a uni…
Miles-Garnsey Mar 27, 2024
1fea500
Fix controller gen version so it works on ARM macs.
Miles-Garnsey Mar 27, 2024
cf981c2
controller-gen generated changes.
Miles-Garnsey Mar 27, 2024
96ceac1
Changelog.
Miles-Garnsey Mar 27, 2024
56ba4f9
Try reconciling this using a patching approach instead of ReconcileOb…
Miles-Garnsey Mar 27, 2024
8b09c4b
Fix changelog.
Miles-Garnsey Apr 3, 2024
e14083d
Micke's requested changes inc. unit test, changelog and conditional p…
Miles-Garnsey Apr 3, 2024
616e95a
Identified an issue where requeue would not happened on a context can…
Miles-Garnsey Apr 3, 2024
0bbb969
Fix test issue where secret wasn't being updated.
Miles-Garnsey Apr 3, 2024
3528dd0
Merge branch 'main' into feature/medusa-bucket-secret-label
Miles-Garnsey Apr 3, 2024
0d5bbf6
Make the linter happy.
Miles-Garnsey Apr 4, 2024
fa1389b
Fix very annoying regression.
Miles-Garnsey Apr 4, 2024
6a7d00f
Remove requeueAfter from error path in patch.
Miles-Garnsey Apr 4, 2024
e10860a
Change port used by the registry to avoid conflict with MacOS stuff.
Miles-Garnsey Apr 4, 2024
e71e35b
Downgrade kustomize, ensure e2e tests use repo-local kustomize, not s…
Miles-Garnsey Apr 5, 2024
2b69e44
Make sure default LOCALBIN is defined ahead of targets that use it.
Miles-Garnsey Apr 5, 2024
174ec66
Make sure kustomize gets downloaded.
Miles-Garnsey Apr 5, 2024
9aacfab
Fix missing patch permission on controller service account.
Miles-Garnsey Apr 5, 2024
d21a4ef
Longer timeout for restore - this keeps failing in CI.
Miles-Garnsey Apr 5, 2024
07c23c8
Roll kustomize to 4.5.7 per Micke's request.
Miles-Garnsey Apr 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG/CHANGELOG-1.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Changelog for the K8ssandra Operator, new PRs should update the `unreleased` sec

When cutting a new release, update the `unreleased` heading to the tag being generated and date, like `## vX.Y.Z - YYYY-MM-DD` and create a new placeholder section for `unreleased` entries.

## unreleased
* [BUGFIX] [#1253](https://github.com/k8ssandra/k8ssandra-operator/issues/1253) Medusa storage secrets are now labelled with a unique label.
* [FEATURE] [#1260](https://github.com/k8ssandra/k8ssandra-operator/issues/1260) Update controller-gen to version 0.14.0.


## v1.14.0 - 2024-04-02

* [FEATURE] [#1242](https://github.com/k8ssandra/k8ssandra-operator/issues/1242) Allow for creation of replicated secrets with a prefix, so that we can distinguish between multiple secrets with the same origin but targeting different clusters.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint # TODO Add linting to the GHA also
## Tool Versions
CERT_MANAGER_VERSION ?= v1.12.2
KUSTOMIZE_VERSION ?= v5.0.3
CONTROLLER_TOOLS_VERSION ?= v0.12.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
GOLINT_VERSION ?= 1.55.0

cert-manager: ## Install cert-manager to the cluster
Expand Down
1 change: 0 additions & 1 deletion apis/config/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/control/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions apis/k8ssandra/v1alpha1/k8ssandracluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"github.com/k8ssandra/k8ssandra-operator/pkg/encryption"
"github.com/k8ssandra/k8ssandra-operator/pkg/images"
"github.com/k8ssandra/k8ssandra-operator/pkg/meta"
"github.com/k8ssandra/k8ssandra-operator/pkg/utils"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -537,3 +538,11 @@
}
return float64(16)
}

// GetClusterIdHash should be used to derive short form unique identifiers for the cluster,
// this is to be used to name resources that are cluster specific in preference of concatenations
// of the namespaced name, as the latter are becoming too long and causing issues due to DNS name length
// constraints within k8s
func (kc *K8ssandraCluster) GetClusterIdHash(nchars int) string {
return utils.HashNameNamespace(kc.Name, kc.Namespace)

Check warning on line 547 in apis/k8ssandra/v1alpha1/k8ssandracluster_types.go

View check run for this annotation

Codecov / codecov/patch

apis/k8ssandra/v1alpha1/k8ssandracluster_types.go#L546-L547

Added lines #L546 - L547 were not covered by tests
}
1 change: 0 additions & 1 deletion apis/k8ssandra/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/medusa/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/reaper/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/replication/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/stargate/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/telemetry/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31,415 changes: 14,539 additions & 16,876 deletions charts/k8ssandra-operator/crds/k8ssandra-operator-crds.yaml

Large diffs are not rendered by default.

31 changes: 19 additions & 12 deletions config/crd/bases/config.k8ssandra.io_clientconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.14.0
name: clientconfigs.config.k8ssandra.io
spec:
group: config.k8ssandra.io
Expand All @@ -20,14 +20,19 @@ spec:
description: ClientConfig is the Schema for the kubeconfigs 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'
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'
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
Expand All @@ -39,13 +44,15 @@ spec:
If not set, the ClientConfig.Name is used as context name
type: string
kubeConfigSecret:
description: KubeConfigSecret should reference an existing secret;
the actual configuration will be read from this secret's "kubeconfig"
key.
description: |-
KubeConfigSecret should reference an existing secret; the actual configuration will be read from
this secret's "kubeconfig" key.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
Expand Down
Loading
Loading