Skip to content

Commit cee0195

Browse files
authored
add applyconfigurations (#4701)
Assisted-by: Cursor:grok-4.5 Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
1 parent ac8d58e commit cee0195

24 files changed

Lines changed: 1457 additions & 11 deletions

api/doc.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2026 The kpt Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package apis contains the kpt API type definitions.
16+
package apis
17+
18+
//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.21.0 object:headerFile="../hack/boilerplate.go.txt",year=$YEAR_GEN applyconfiguration:headerFile="../hack/boilerplate.go.txt" paths=./...
19+
// Drop generated helpers that pull in k8s.io/apimachinery; typed ACs are enough.
20+
//go:generate rm -rf generated/applyconfigurations/utils.go generated/applyconfigurations/internal

api/fnresult/v1/types.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
// +kubebuilder:object:generate=true
16+
// +kubebuilder:ac:generate=true
17+
// +kubebuilder:ac:output:package=../../generated/applyconfigurations
18+
// +groupName=kpt.dev
1619
package v1
1720

1821
import (
@@ -25,8 +28,6 @@ import (
2528
"sigs.k8s.io/kustomize/kyaml/yaml"
2629
)
2730

28-
//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.21.0 object:headerFile="../../../hack/boilerplate.go.txt",year=$YEAR_GEN
29-
3031
// Result contains the structured result from an individual function
3132
type Result struct {
3233
// Image is the full name of the image that generates this result
@@ -71,6 +72,7 @@ func ResultListGVK() schema.GroupVersionKind {
7172
}
7273

7374
// ResultList contains aggregated results from multiple functions
75+
// +kubebuilder:ac:generate=true
7476
type ResultList struct {
7577
yaml.ResourceMeta `yaml:",inline"`
7678
// ExitCode is the exit code of kpt command

api/generated/applyconfigurations/fnresult/v1/field.go

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/generated/applyconfigurations/fnresult/v1/resultitem.go

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/generated/applyconfigurations/kptfile/v1/condition.go

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)