Bootstraps the empty repo into a kubebuilder go/v4 project: group crawl.example.com, version v1alpha1, kind Proxy (namespaced). Keeps the existing module path and preserves the repo's Go/testing/changelog conventions from CLAUDE.md untouched. Drops the scaffolded GitHub Actions workflows since the remote is Gitea, not GitHub. Everything else is default kubebuilder output, unmodified, so later diffs stay reviewable against a known baseline. Full implementation plan: docs/plans/2026-08-07-1747-proxy-operator.md Co-Authored-By: Claude <noreply@anthropic.com>
45 lines
1.5 KiB
Go
45 lines
1.5 KiB
Go
/*
|
|
Copyright 2026.
|
|
|
|
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 v1alpha1 contains API Schema definitions for the crawl v1alpha1 API group.
|
|
// +kubebuilder:object:generate=true
|
|
// +groupName=crawl.example.com
|
|
package v1alpha1
|
|
|
|
import (
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
)
|
|
|
|
var (
|
|
// SchemeGroupVersion is group version used to register these objects.
|
|
// This name is used by applyconfiguration generators (e.g. controller-gen).
|
|
SchemeGroupVersion = schema.GroupVersion{Group: "crawl.example.com", Version: "v1alpha1"}
|
|
|
|
// GroupVersion is an alias for SchemeGroupVersion, for backward compatibility.
|
|
GroupVersion = SchemeGroupVersion
|
|
|
|
// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
|
|
SchemeBuilder = runtime.NewSchemeBuilder(func(scheme *runtime.Scheme) error {
|
|
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
|
return nil
|
|
})
|
|
|
|
// AddToScheme adds the types in this group-version to the given scheme.
|
|
AddToScheme = SchemeBuilder.AddToScheme
|
|
)
|