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

Move bootstrap and keyrings to core group #928

Merged
merged 1 commit into from
Dec 18, 2022
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
41 changes: 41 additions & 0 deletions apis/core/v1beta1/core_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package v1beta1

import (
opnicorev1 "github.com/rancher/opni/pkg/apis/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +kubebuilder:object:root=true
type BootstrapToken struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec *opnicorev1.BootstrapToken `json:"spec,omitempty"`
}

// +kubebuilder:object:root=true
type BootstrapTokenList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BootstrapToken `json:"items"`
}

// +kubebuilder:object:root=true
type Keyring struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Data []byte `json:"data,omitempty"`
}

// +kubebuilder:object:root=true
type KeyringList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Keyring `json:"items"`
}

func init() {
SchemeBuilder.Register(
&BootstrapToken{}, &BootstrapTokenList{},
&Keyring{}, &KeyringList{},
)
}
123 changes: 123 additions & 0 deletions apis/core/v1beta1/zz_generated.deepcopy.go

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

30 changes: 0 additions & 30 deletions apis/monitoring/v1beta1/core_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +kubebuilder:object:root=true
type BootstrapToken struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec *opnicorev1.BootstrapToken `json:"spec,omitempty"`
}

// +kubebuilder:object:root=true
type BootstrapTokenList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BootstrapToken `json:"items"`
}

// +kubebuilder:object:root=true
type Role struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -47,25 +33,9 @@ type RoleBindingList struct {
Items []RoleBinding `json:"items"`
}

// +kubebuilder:object:root=true
type Keyring struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Data []byte `json:"data,omitempty"`
}

// +kubebuilder:object:root=true
type KeyringList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Keyring `json:"items"`
}

func init() {
SchemeBuilder.Register(
&BootstrapToken{}, &BootstrapTokenList{},
&Role{}, &RoleList{},
&RoleBinding{}, &RoleBindingList{},
&Keyring{}, &KeyringList{},
)
}
123 changes: 0 additions & 123 deletions apis/monitoring/v1beta1/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 @@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.1-0.20220428122951-32ad71090a62
creationTimestamp: null
name: bootstraptokens.monitoring.opni.io
name: bootstraptokens.core.opni.io
spec:
group: monitoring.opni.io
group: core.opni.io
names:
kind: BootstrapToken
listKind: BootstrapTokenList
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.8.1-0.20220428122951-32ad71090a62
creationTimestamp: null
name: keyrings.monitoring.opni.io
name: keyrings.core.opni.io
spec:
group: monitoring.opni.io
group: core.opni.io
names:
kind: Keyring
listKind: KeyringList
Expand Down
4 changes: 2 additions & 2 deletions config/agent-crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ resources:
- logging/logging.opni.io_outputs.yaml
- bases/logging.opni.io_logadapters.yaml
- bases/logging.opni.io_datapreppers.yaml
- bases/monitoring.opni.io_bootstraptokens.yaml
- bases/monitoring.opni.io_keyrings.yaml
- bases/core.opni.io_bootstraptokens.yaml
- bases/core.opni.io_keyrings.yaml
# +kubebuilder:scaffold:crdkustomizeresource

# the following config is for teaching kustomize how to do kustomization for CRDs.
Expand Down
Loading