Skip to content

Commit

Permalink
rollouts: rename RemoteRootSync to RemoteSync (#3857)
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha41575 committed Mar 8, 2023
1 parent a6f1175 commit 9f6a868
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 302 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// RemoteRootSyncSpec defines the desired state of RemoteRootSync
type RemoteRootSyncSpec struct {
// RemoteSyncSpec defines the desired state of RemoteSync
type RemoteSyncSpec struct {
// ClusterReference contains the identify information need to refer a cluster.
ClusterRef ClusterRef `json:"clusterRef,omitempty"`
Template *RootSyncInfo `json:"template,omitempty"`
Template *Template `json:"template,omitempty"`
Type SyncTemplateType `json:"type,omitempty"`
}

type RootSyncInfo struct {
Spec *RootSyncSpec `json:"spec,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
type Template struct {
Spec *SyncSpec `json:"spec,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
}

type RootSyncSpec struct {
type SyncSpec struct {
SourceFormat string `json:"sourceFormat,omitempty"`
Git *GitInfo `json:"git,omitempty"`
}
Expand All @@ -60,8 +60,8 @@ type Metadata struct {
Annotations map[string]string `json:"annotations,omitempty"`
}

// RemoteRootSyncStatus defines the observed state of RemoteRootSync
type RemoteRootSyncStatus struct {
// RemoteSyncStatus defines the observed state of RemoteSync
type RemoteSyncStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Expand All @@ -79,24 +79,24 @@ type RemoteRootSyncStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// RemoteRootSync is the Schema for the remoterootsyncs API
type RemoteRootSync struct {
// RemoteSync is the Schema for the remotesyncs API
type RemoteSync struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec RemoteRootSyncSpec `json:"spec,omitempty"`
Status RemoteRootSyncStatus `json:"status,omitempty"`
Spec RemoteSyncSpec `json:"spec,omitempty"`
Status RemoteSyncStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// RemoteRootSyncList contains a list of RemoteRootSync
type RemoteRootSyncList struct {
// RemoteSyncList contains a list of RemoteSync
type RemoteSyncList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RemoteRootSync `json:"items"`
Items []RemoteSync `json:"items"`
}

func init() {
SchemeBuilder.Register(&RemoteRootSync{}, &RemoteRootSyncList{})
SchemeBuilder.Register(&RemoteSync{}, &RemoteSyncList{})
}
130 changes: 65 additions & 65 deletions rollouts/api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: remoterootsyncs.gitops.kpt.dev
name: remotesyncs.gitops.kpt.dev
spec:
group: gitops.kpt.dev
names:
kind: RemoteRootSync
listKind: RemoteRootSyncList
plural: remoterootsyncs
singular: remoterootsync
kind: RemoteSync
listKind: RemoteSyncList
plural: remotesyncs
singular: remotesync
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: RemoteRootSync is the Schema for the remoterootsyncs API
description: RemoteSync is the Schema for the remotesyncs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -47,7 +47,7 @@ spec:
metadata:
type: object
spec:
description: RemoteRootSyncSpec defines the desired state of RemoteRootSync
description: RemoteSyncSpec defines the desired state of RemoteSync
properties:
clusterRef:
description: ClusterReference contains the identify information need
Expand Down Expand Up @@ -118,7 +118,7 @@ spec:
type: string
type: object
status:
description: RemoteRootSyncStatus defines the observed state of RemoteRootSync
description: RemoteSyncStatus defines the observed state of RemoteSync
properties:
conditions:
description: Conditions describes the reconciliation state of the
Expand Down
2 changes: 1 addition & 1 deletion rollouts/config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# It should be run by config/default
resources:
- bases/gitops.kpt.dev_rollouts.yaml
- bases/gitops.kpt.dev_remoterootsyncs.yaml
- bases/gitops.kpt.dev_remotesyncs.yaml
- bases/gitops.kpt.dev_progressiverolloutstrategies.yaml
#+kubebuilder:scaffold:crdkustomizeresource

Expand Down
6 changes: 3 additions & 3 deletions rollouts/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ rules:
- apiGroups:
- gitops.kpt.dev
resources:
- remoterootsyncs
- remotesyncs
verbs:
- create
- delete
Expand All @@ -68,13 +68,13 @@ rules:
- apiGroups:
- gitops.kpt.dev
resources:
- remoterootsyncs/finalizers
- remotesyncs/finalizers
verbs:
- update
- apiGroups:
- gitops.kpt.dev
resources:
- remoterootsyncs/status
- remotesyncs/status
verbs:
- get
- patch
Expand Down
Loading

0 comments on commit 9f6a868

Please sign in to comment.