minimum runnable

This commit is contained in:
2026-05-14 18:55:57 +02:00
parent 0d160b5f08
commit 93fd4e89d5
52 changed files with 948 additions and 1744 deletions
@@ -16,7 +16,7 @@ limitations under the License.
// +k8s:deepcopy-gen=package
// +k8s:openapi-gen=true
// +groupName=samplecontroller.k8s.io
// +groupName=proxyprovider.t000-n.de
// Package v1alpha1 is the v1alpha1 version of the API.
package v1alpha1
// Package v1 is the v1 version of the API.
package v1
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -23,32 +23,30 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Foo is a specification for a Foo resource
type Foo struct {
type ProxyProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec FooSpec `json:"spec"`
Status FooStatus `json:"status"`
Spec ProxyProviderSpec `json:"spec"`
Status ProxyProviderStatus `json:"status"`
}
// FooSpec is the spec for a Foo resource
type FooSpec struct {
DeploymentName string `json:"deploymentName"`
Replicas *int32 `json:"replicas"`
type ProxyProviderSpec struct {
Name string `json:"name"`
AuthorizationFlow string `json:"authorization_flow"`
InvalidationFlow string `json:"invalidation_flow"`
ExternalHost string `json:"external_host"`
}
// FooStatus is the status for a Foo resource
type FooStatus struct {
AvailableReplicas int32 `json:"availableReplicas"`
type ProxyProviderStatus struct {
PK string `json:"pk"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// FooList is a list of Foo resources
type FooList struct {
type ProxyProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Foo `json:"items"`
Items []ProxyProvider `json:"items"`
}
@@ -19,34 +19,34 @@ limitations under the License.
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
package v1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Foo) DeepCopyInto(out *Foo) {
func (in *ProxyProvider) DeepCopyInto(out *ProxyProvider) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Spec = in.Spec
out.Status = in.Status
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Foo.
func (in *Foo) DeepCopy() *Foo {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProvider.
func (in *ProxyProvider) DeepCopy() *ProxyProvider {
if in == nil {
return nil
}
out := new(Foo)
out := new(ProxyProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Foo) DeepCopyObject() runtime.Object {
func (in *ProxyProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@@ -54,13 +54,13 @@ func (in *Foo) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FooList) DeepCopyInto(out *FooList) {
func (in *ProxyProviderList) DeepCopyInto(out *ProxyProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Foo, len(*in))
*out = make([]ProxyProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -68,18 +68,18 @@ func (in *FooList) DeepCopyInto(out *FooList) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooList.
func (in *FooList) DeepCopy() *FooList {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProviderList.
func (in *ProxyProviderList) DeepCopy() *ProxyProviderList {
if in == nil {
return nil
}
out := new(FooList)
out := new(ProxyProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *FooList) DeepCopyObject() runtime.Object {
func (in *ProxyProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@@ -87,38 +87,33 @@ func (in *FooList) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FooSpec) DeepCopyInto(out *FooSpec) {
func (in *ProxyProviderSpec) DeepCopyInto(out *ProxyProviderSpec) {
*out = *in
if in.Replicas != nil {
in, out := &in.Replicas, &out.Replicas
*out = new(int32)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooSpec.
func (in *FooSpec) DeepCopy() *FooSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProviderSpec.
func (in *ProxyProviderSpec) DeepCopy() *ProxyProviderSpec {
if in == nil {
return nil
}
out := new(FooSpec)
out := new(ProxyProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FooStatus) DeepCopyInto(out *FooStatus) {
func (in *ProxyProviderStatus) DeepCopyInto(out *ProxyProviderStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooStatus.
func (in *FooStatus) DeepCopy() *FooStatus {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProviderStatus.
func (in *ProxyProviderStatus) DeepCopy() *ProxyProviderStatus {
if in == nil {
return nil
}
out := new(FooStatus)
out := new(ProxyProviderStatus)
in.DeepCopyInto(out)
return out
}
@@ -19,24 +19,24 @@ limitations under the License.
// Code generated by register-gen. DO NOT EDIT.
package v1alpha1
package v1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName specifies the group name used to register the objects.
const GroupName = "samplecontroller.k8s.io"
const GroupName = "proxyprovider.t000-n.de"
// GroupVersion specifies the group and the version used to register the objects.
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
var GroupVersion = metav1.GroupVersion{Group: GroupName, Version: "v1"}
// SchemeGroupVersion is group version used to register these objects
//
// Deprecated: use GroupVersion instead.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
@@ -62,10 +62,10 @@ func init() {
// Adds the list of known types to Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Foo{},
&FooList{},
&ProxyProvider{},
&ProxyProviderList{},
)
// AddToGroupVersion allows the serialization of client types like ListOptions.
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}