Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions api/addons/v1beta2/clusterresourceset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2"
)

// ClusterResourceSet's ResourcesApplied condition and corresponding reasons that will be used in v1Beta2 API version.
// ClusterResourceSet's ResourcesApplied condition and corresponding reasons.
const (
// ResourcesAppliedV1Beta2Condition surfaces wether the resources in the ClusterResourceSet are applied to all matching clusters.
// ClusterResourceSetResourcesAppliedCondition surfaces wether the resources in the ClusterResourceSet are applied to all matching clusters.
// This indicates all resources exist, and no errors during applying them to all clusters.
ResourcesAppliedV1Beta2Condition = "ResourcesApplied"
ClusterResourceSetResourcesAppliedCondition = "ResourcesApplied"

// ResourcesAppliedV1beta2Reason is the reason used when all resources in the ClusterResourceSet object got applied
// ClusterResourceSetResourcesAppliedReason is the reason used when all resources in the ClusterResourceSet object got applied
// to all matching clusters.
ResourcesAppliedV1beta2Reason = "Applied"
ClusterResourceSetResourcesAppliedReason = "Applied"

// ResourcesNotAppliedV1Beta2Reason is the reason used when applying at least one of the resources to one of the matching clusters failed.
ResourcesNotAppliedV1Beta2Reason = "NotApplied"
// ClusterResourceSetResourcesNotAppliedReason is the reason used when applying at least one of the resources to one of the matching clusters failed.
ClusterResourceSetResourcesNotAppliedReason = "NotApplied"

// ResourcesAppliedWrongSecretTypeV1Beta2Reason is the reason used when the Secret's type in the resource list is not supported.
ResourcesAppliedWrongSecretTypeV1Beta2Reason = "WrongSecretType"
// ClusterResourceSetResourcesAppliedWrongSecretTypeReason is the reason used when the Secret's type in the resource list is not supported.
ClusterResourceSetResourcesAppliedWrongSecretTypeReason = "WrongSecretType"

// ResourcesAppliedInternalErrorV1Beta2Reason surfaces unexpected failures when reconciling a ClusterResourceSet.
ResourcesAppliedInternalErrorV1Beta2Reason = clusterv1.InternalErrorV1Beta2Reason
// ClusterResourceSetResourcesAppliedInternalErrorReason surfaces unexpected failures when reconciling a ClusterResourceSet.
ClusterResourceSetResourcesAppliedInternalErrorReason = clusterv1.InternalErrorReason
)

const (
Expand Down Expand Up @@ -120,7 +120,7 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy)
// ClusterResourceSetStatus defines the observed state of ClusterResourceSet.
type ClusterResourceSetStatus struct {
// conditions represents the observations of a ClusterResourceSet's current state.
// Known condition types are ResourceSetApplied, Deleting.
// Known condition types are ResourcesApplied.
// +optional
// +listType=map
// +listMapKey=type
Expand Down
41 changes: 0 additions & 41 deletions api/addons/v1beta2/condition_consts.go

This file was deleted.

41 changes: 41 additions & 0 deletions api/addons/v1beta2/v1beta1_condition_consts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright 2025 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta2

import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2"

// Conditions and condition Reasons for the ClusterResourceSet object.
const (
// ResourcesAppliedV1Beta1Condition documents that all resources in the ClusterResourceSet object are applied to
// all matching clusters. This indicates all resources exist, and no errors during applying them to all clusters.
ResourcesAppliedV1Beta1Condition clusterv1.ConditionType = "ResourcesApplied"

// RemoteClusterClientFailedV1Beta1Reason (Severity=Error) documents failure during getting the remote cluster client.
RemoteClusterClientFailedV1Beta1Reason = "RemoteClusterClientFailed"

// ClusterMatchFailedV1Beta1Reason (Severity=Warning) documents failure getting clusters that match the clusterSelector.
ClusterMatchFailedV1Beta1Reason = "ClusterMatchFailed"

// ApplyFailedV1Beta1Reason (Severity=Warning) documents applying at least one of the resources to one of the matching clusters is failed.
ApplyFailedV1Beta1Reason = "ApplyFailed"

// RetrievingResourceFailedV1Beta1Reason (Severity=Warning) documents at least one of the resources are not successfully retrieved.
RetrievingResourceFailedV1Beta1Reason = "RetrievingResourceFailed"

// WrongSecretTypeV1Beta1Reason (Severity=Warning) documents at least one of the Secret's type in the resource list is not supported.
WrongSecretTypeV1Beta1Reason = "WrongSecretType"
)
Loading