Skip to content

Commit

Permalink
Add rancher setting under proxy types
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Aug 29, 2024
1 parent 0f500bc commit 70551eb
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ generate-manifests-external: vendor controller-gen ## Generate ClusterRole and C

.PHONY: generate-manifests-api
generate-manifests-api: controller-gen ## Generate ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd paths="./api/..." \
$(CONTROLLER_GEN) rbac:roleName=manager-role crd paths="./api/v1alpha1/..." \
output:crd:artifacts:config=./config/crd/bases \
output:rbac:dir=./config/rbac \

Expand Down
44 changes: 44 additions & 0 deletions api/rancher/management/v3/setting.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
Copyright © 2023 - 2024 SUSE LLC
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 v3

import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

// Setting is the struct representing a Rancher Setting.
// +kubebuilder:object:root=true
type Setting struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Value string `json:"value"`
Default string `json:"default,omitempty"`
Customized bool `json:"customized,omitempty"`
Source string `json:"source"`
}

// SettingList contains a list of Settings.
// +kubebuilder:object:root=true
type SettingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

Items []Setting `json:"items"`
}

func init() {
SchemeBuilder.Register(&Setting{}, &SettingList{})
}
57 changes: 57 additions & 0 deletions api/rancher/management/v3/zz_generated.deepcopy.go

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

0 comments on commit 70551eb

Please sign in to comment.