Skip to content

Commit

Permalink
feat: change api group to apps.kusionstack.io (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoumo committed Aug 17, 2023
1 parent 4c12e9e commit 035bb84
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 50 deletions.
4 changes: 2 additions & 2 deletions apis/apps/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=apps.kafed.io
// +groupName=apps.kusionstack.io
package v1alpha1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "apps.kafed.io", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "apps.kusionstack.io", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
6 changes: 3 additions & 3 deletions apis/apps/v1alpha1/well_known_annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.
package v1alpha1

const (
PodAvailableConditionsAnnotation = "kafed.kusionstack.io/available-conditions" // indicate the available conditions of a pod
PodAvailableConditionsAnnotation = "pod.kusionstack.io/available-conditions" // indicate the available conditions of a pod

LastPodStatusAnnotationKey = "collaset.kafed.kusionstack.io/last-pod-status"
AnnotationPodSkipRuleConditions = "ruleset.kusionstack.io/skip-rule-conditions"

AnnotationPodSkipRuleConditions = "ruleset.kafed.kusionstack.io/skip-rule-conditions"
LastPodStatusAnnotationKey = "collaset.kusionstack.io/last-pod-status"
)
44 changes: 22 additions & 22 deletions apis/apps/v1alpha1/well_known_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ limitations under the License.

package v1alpha1

// pod ops lifecyle labels
const (
PodScalingInPhaseLabel = "cafed.kusionstack.io/scaling-in" // indicate a pod is scaling in

PodOperatingLabelPrefix = "operating.kafed.kusionstack.io" // indicate a pod is operating
PodOperationTypeLabelPrefix = "operation-type.kafed.kusionstack.io" // indicate the type of operation
PodOperationPermissionLabelPrefix = "operation-permission.kafed.kusionstack.io" // indicate the permission of operation
PodUndoOperationTypeLabelPrefix = "undo-operation-type.kafed.kusionstack.io" // indicate the type of operation has been canceled
PodDoneOperationTypeLabelPrefix = "done-operation-type.kafed.kusionstack.io" // indicate the type of operation has been done

PodPreCheckLabelPrefix = "pre-check.lifecycle.kafed.kusionstack.io" // indicate a pod is in pre-check phase
PodPreCheckedLabelPrefix = "pre-checked.lifecycle.kafed.kusionstack.io" // indicate a pod has finished pre-check phase
PodPrepareLabelPrefix = "prepare.lifecycle.kafed.kusionstack.io" // indicate a pod is in prepare phase
PodOperateLabelPrefix = "operate.lifecycle.kafed.kusionstack.io" // indicate a pod is in operate phase
PodOperatedLabelPrefix = "operated.lifecycle.kafed.kusionstack.io" // indicate a pod has finished operate phase
PodPostCheckLabelPrefix = "post-check.lifecycle.kafed.kusionstack.io" // indicate a pod is in post-check phase
PodPostCheckedLabelPrefix = "post-checked.lifecycle.kafed.kusionstack.io" // indicate a pod has finished post-check phase
PodCompleteLabelPrefix = "complete.lifecycle.kafed.kusionstack.io" // indicate a pod has finished all phases

PodServiceAvailableLabel = "kafed.kusionstack.io/service-available" // indicate a pod is available to serve

CollaSetUpdateIndicateLabelKey = "collaset.kafed.kusionstack.io/update-included"
PodOperatingLabelPrefix = "operating.podopslifecycle.kusionstack.io" // indicate a pod is operating
PodOperationTypeLabelPrefix = "operation-type.podopslifecycle.kusionstack.io" // indicate the type of operation
PodOperationPermissionLabelPrefix = "operation-permission.podopslifecycle.kusionstack.io" // indicate the permission of operation
PodUndoOperationTypeLabelPrefix = "undo-operation-type.podopslifecycle.kusionstack.io" // indicate the type of operation has been canceled
PodDoneOperationTypeLabelPrefix = "done-operation-type.podopslifecycle.kusionstack.io" // indicate the type of operation has been done

PodPreCheckLabelPrefix = "pre-check.podopslifecycle.kusionstack.io" // indicate a pod is in pre-check phase
PodPreCheckedLabelPrefix = "pre-checked.podopslifecycle.kusionstack.io" // indicate a pod has finished pre-check phase
PodPrepareLabelPrefix = "prepare.podopslifecycle.kusionstack.io" // indicate a pod is in prepare phase
PodOperateLabelPrefix = "operate.podopslifecycle.kusionstack.io" // indicate a pod is in operate phase
PodOperatedLabelPrefix = "operated.podopslifecycle.kusionstack.io" // indicate a pod has finished operate phase
PodPostCheckLabelPrefix = "post-check.podopslifecycle.kusionstack.io" // indicate a pod is in post-check phase
PodPostCheckedLabelPrefix = "post-checked.podopslifecycle.kusionstack.io" // indicate a pod has finished post-check phase
PodCompleteLabelPrefix = "complete.podopslifecycle.kusionstack.io" // indicate a pod has finished all phases

PodServiceAvailableLabel = "podopslifecycle.kusionstack.io/service-available" // indicate a pod is available to serve
PodInstanceIDLabelKey = "podopslifecycle.kusionstack.io/pod-instance-id"
PodDeletionIndicationLabelKey = "podopslifecycle.kusionstack.io/to-delete" // Users can use this label to indicate a pod to delete
)

PodInstanceIDLabelKey = "kafed.kusionstack.io/pod-instance-id"
PodDeletionIndicationLabelKey = "kafed.kusionstack.io/to-delete" // Users can use this label to indicate a pod to delete
const (
CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion apis/apps/v1alpha1/well_known_readiness_gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ limitations under the License.
package v1alpha1

const (
ReadinessGatePodServiceReady = "kafed.kusionstack.io/service-ready"
ReadinessGatePodServiceReady = "pod.kusionstack.io/service-ready"
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: collasets.apps.kafed.io
name: collasets.apps.kusionstack.io
spec:
group: apps.kafed.io
group: apps.kusionstack.io
names:
kind: CollaSet
listKind: CollaSetList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: resourcecontexts.apps.kafed.io
name: resourcecontexts.apps.kusionstack.io
spec:
group: apps.kafed.io
group: apps.kusionstack.io
names:
kind: ResourceContext
listKind: ResourceContextList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: rulesets.apps.kafed.io
name: rulesets.apps.kusionstack.io
spec:
group: apps.kafed.io
group: apps.kusionstack.io
names:
kind: RuleSet
listKind: RuleSetList
Expand Down
12 changes: 6 additions & 6 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: manager-role
rules:
- apiGroups:
- apps.kafed.io
- apps.kusionstack.io
resources:
- collasets
verbs:
Expand All @@ -18,21 +18,21 @@ rules:
- update
- watch
- apiGroups:
- apps.kafed.io
- apps.kusionstack.io
resources:
- collasets/finalizers
verbs:
- update
- apiGroups:
- apps.kafed.io
- apps.kusionstack.io
resources:
- collasets/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kafed.io
- apps.kusionstack.io
resources:
- rulesets
verbs:
Expand All @@ -44,13 +44,13 @@ rules:
- update
- watch
- apiGroups:
- apps.kafed.io
- apps.kusionstack.io
resources:
- rulesets/finalizers
verbs:
- update
- apiGroups:
- apps.kafed.io
- apps.kusionstack.io
resources:
- rulesets/status
verbs:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/apps_v1alpha1_operationjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps.kafed.io/v1alpha1
apiVersion: apps.kusionstack.io/v1alpha1
kind: OperationJob
metadata:
labels:
Expand Down
6 changes: 3 additions & 3 deletions config/webhook/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: MutatingWebhookConfiguration
metadata:
name: controller-manager-mutating
webhooks:
- name: mutating-generic.apps.kafed.io
- name: mutating-generic.apps.kusionstack.io
sideEffects: NoneOnDryRun
admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
Expand Down Expand Up @@ -31,7 +31,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: controller-manager-validating
webhooks:
- name: validating-generic.apps.kafed.io
- name: validating-generic.apps.kusionstack.io
sideEffects: NoneOnDryRun
admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
Expand All @@ -50,4 +50,4 @@ webhooks:
- UPDATE
resources:
- pods
scope: '*'
scope: '*'
6 changes: 3 additions & 3 deletions pkg/controllers/collaset/collaset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ func AddToMgr(mgr ctrl.Manager, r reconcile.Reconciler) error {
return nil
}

//+kubebuilder:rbac:groups=apps.kafed.io,resources=collasets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps.kafed.io,resources=collasets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps.kafed.io,resources=collasets/finalizers,verbs=update
//+kubebuilder:rbac:groups=apps.kusionstack.io,resources=collasets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps.kusionstack.io,resources=collasets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps.kusionstack.io,resources=collasets/finalizers,verbs=update

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down
6 changes: 3 additions & 3 deletions pkg/controllers/ruleset/ruleset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ type RuleSetReconciler struct {
logr.Logger
}

//+kubebuilder:rbac:groups=apps.kafed.io,resources=rulesets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps.kafed.io,resources=rulesets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps.kafed.io,resources=rulesets/finalizers,verbs=update
//+kubebuilder:rbac:groups=apps.kusionstack.io,resources=rulesets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps.kusionstack.io,resources=rulesets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps.kusionstack.io,resources=rulesets/finalizers,verbs=update

func (r *RuleSetReconciler) Reconcile(ctx context.Context, request reconcile.Request) (result reconcile.Result, reconcileErr error) {

Expand Down

0 comments on commit 035bb84

Please sign in to comment.