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
1 change: 1 addition & 0 deletions config/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ConsoleList{},
&DNS{},
&DNSList{},
&GenericControllerConfig{},
&IdentityProvider{},
&IdentityProviderList{},
&Image{},
Expand Down
30 changes: 30 additions & 0 deletions config/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,33 @@ type ClientConnectionOverrides struct {
// burst allows extra queries to accumulate when a client is exceeding its rate.
Burst int32 `json:"burst"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// GenericControllerConfig provides information to configure a controller
type GenericControllerConfig struct {
metav1.TypeMeta `json:",inline"`

// ServingInfo is the HTTP serving information for the controller's endpoints
ServingInfo HTTPServingInfo `json:"servingInfo,omitempty"`

// leaderElection provides information to elect a leader. Only override this if you have a specific need
LeaderElection LeaderElection `json:"leaderElection,omitempty"`

// authentication allows configuration of authentication for the endpoints
Authentication DelegatedAuthentication `json:"authentication,omitempty"`
// authorization allows configuration of authentication for the endpoints
Authorization DelegatedAuthorization `json:"authorization,omitempty"`
}

// DelegatedAuthentication allows authentication to be disabled.
type DelegatedAuthentication struct {
// disabled indicates that authentication should be disabled. By default it will use delegated authentication.
Disabled bool `json:"disabled,omitempty"`
}

// DelegatedAuthorization allows authorization to be disabled.
type DelegatedAuthorization struct {
// disabled indicates that authorization should be disabled. By default it will use delegated authorization.
Disabled bool `json:"disabled,omitempty"`
}
30 changes: 30 additions & 0 deletions config/v1/types_swagger_doc_generated.go

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

61 changes: 61 additions & 0 deletions config/v1/zz_generated.deepcopy.go

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

1 change: 1 addition & 0 deletions hack/lib/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ legacyconfig/v1 \
network/v1 \
oauth/v1 \
openshiftcontrolplane/v1 \
operator/v1 \
operator/v1alpha1 \
project/v1 \
quota/v1 \
Expand Down
2 changes: 1 addition & 1 deletion hack/update-deepcopy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ verify="${VERIFY:-}"
${CODEGEN_PKG}/generate-groups.sh "deepcopy" \
github.com/openshift/api/generated \
github.com/openshift/api \
"apps:v1 authorization:v1 build:v1 config:v1 image:v1,docker10,dockerpre012 kubecontrolplane:v1 legacyconfig:v1 network:v1 oauth:v1 openshiftcontrolplane:v1 operator:v1alpha1 osin:v1 project:v1 quota:v1 route:v1 security:v1 servicecertsigner:v1alpha1 template:v1 user:v1 webconsole:v1" \
"apps:v1 authorization:v1 build:v1 config:v1 image:v1,docker10,dockerpre012 kubecontrolplane:v1 legacyconfig:v1 network:v1 oauth:v1 openshiftcontrolplane:v1 operator:v1 operator:v1alpha1 osin:v1 project:v1 quota:v1 route:v1 security:v1 servicecertsigner:v1alpha1 template:v1 user:v1 webconsole:v1" \
--go-header-file ${SCRIPT_ROOT}/hack/empty.txt \
${verify}
3 changes: 2 additions & 1 deletion operator/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

operatorv1 "github.com/openshift/api/operator/v1"
operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1"
)

Expand All @@ -12,7 +13,7 @@ const (
)

var (
schemeBuilder = runtime.NewSchemeBuilder(operatorv1alpha1.Install)
schemeBuilder = runtime.NewSchemeBuilder(operatorv1alpha1.Install, operatorv1.Install)
// Install is a function which adds every version of this group to a scheme
Install = schemeBuilder.AddToScheme
)
Expand Down
6 changes: 6 additions & 0 deletions operator/v1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// +k8s:deepcopy-gen=package,register
// +k8s:defaulter-gen=TypeMeta
// +k8s:openapi-gen=true

// +groupName=operator.openshift.io
package v1
37 changes: 37 additions & 0 deletions operator/v1/register.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package v1

import (
configv1 "github.com/openshift/api/config/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)

var (
GroupName = "operator.openshift.io"
GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install)
// Install is a function which adds this version to a scheme
Install = schemeBuilder.AddToScheme

// SchemeGroupVersion generated code relies on this name
// Deprecated
SchemeGroupVersion = GroupVersion
// AddToScheme exists solely to keep the old generators creating valid code
// DEPRECATED
AddToScheme = schemeBuilder.AddToScheme
)

// Resource generated code relies on this being here, but it logically belongs to the group
// DEPRECATED
func Resource(resource string) schema.GroupResource {
return schema.GroupResource{Group: GroupName, Resource: resource}
}

func addKnownTypes(scheme *runtime.Scheme) error {
metav1.AddToGroupVersion(scheme, GroupVersion)

scheme.AddKnownTypes(GroupVersion)

return nil
}
Loading