mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Improve package doc.
This commit is contained in:
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package app implements state for the set of all resources being customized.
|
||||||
|
// Should rename this - there's nothing "app"y about it.
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/constants"
|
"github.com/kubernetes-sigs/kustomize/pkg/constants"
|
||||||
|
"github.com/kubernetes-sigs/kustomize/pkg/internal/loadertest"
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/loader"
|
"github.com/kubernetes-sigs/kustomize/pkg/loader"
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/loader/loadertest"
|
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
|
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/resource"
|
"github.com/kubernetes-sigs/kustomize/pkg/resource"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package commands holds the CLI glue mapping textual commands/args to method calls.
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package configmapandsecret generates configmaps and secrets per generator rules.
|
||||||
package configmapandsecret
|
package configmapandsecret
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package util offers Configmap and Secret generation utilities.
|
||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
// Package diff runs system diff to compare resource collections
|
|
||||||
package diff
|
|
||||||
@@ -1,3 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
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 diff runs system `diff` to compare resource collections.
|
||||||
package diff
|
package diff
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package fs provides a file system abstraction layer.
|
||||||
package fs
|
package fs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package hash generates hash strings from configmaps and secrets.
|
||||||
package hash
|
package hash
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package loadertest holds a fake for the Loader interface.
|
||||||
package loadertest
|
package loadertest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package loader has a data loading interface and various implementations.
|
||||||
package loader
|
package loader
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/loader/loadertest"
|
"github.com/kubernetes-sigs/kustomize/pkg/internal/loadertest"
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/resource"
|
"github.com/kubernetes-sigs/kustomize/pkg/resource"
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/types"
|
"github.com/kubernetes-sigs/kustomize/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
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 resmap implements a map from ResId to Resource that tracks all resources in a kustomization.
|
||||||
package resmap
|
package resmap
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -17,7 +34,7 @@ import (
|
|||||||
k8syaml "k8s.io/apimachinery/pkg/util/yaml"
|
k8syaml "k8s.io/apimachinery/pkg/util/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ResMap is a map from ResId to Resource
|
// ResMap is a map from ResId to Resource.
|
||||||
type ResMap map[resource.ResId]*resource.Resource
|
type ResMap map[resource.ResId]*resource.Resource
|
||||||
|
|
||||||
// EncodeAsYaml encodes a ResMap to YAML; encoded objects separated by `---`.
|
// EncodeAsYaml encodes a ResMap to YAML; encoded objects separated by `---`.
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/loader/loadertest"
|
"github.com/kubernetes-sigs/kustomize/pkg/internal/loadertest"
|
||||||
"github.com/kubernetes-sigs/kustomize/pkg/resource"
|
"github.com/kubernetes-sigs/kustomize/pkg/resource"
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package resource implements representations of k8s API resources as "unstructured" objects.
|
||||||
package resource
|
package resource
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -14,12 +14,13 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package transformers has implementations of resmap.ResMap transformers.
|
||||||
package transformers
|
package transformers
|
||||||
|
|
||||||
import "github.com/kubernetes-sigs/kustomize/pkg/resmap"
|
import "github.com/kubernetes-sigs/kustomize/pkg/resmap"
|
||||||
|
|
||||||
// Transformer can transform objects.
|
// A Transformer modifies an instance of resmap.ResMap.
|
||||||
type Transformer interface {
|
type Transformer interface {
|
||||||
// Transform modifies objects in a map, e.g. add prefixes or additional labels.
|
// Transform modifies data in the argument, e.g. adding labels to resources that can be labelled.
|
||||||
Transform(m resmap.ResMap) error
|
Transform(m resmap.ResMap) error
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Package types holds struct definitions that should find a better home.
|
||||||
package types
|
package types
|
||||||
|
|
||||||
// Kustomization holds the information needed to generate customized k8s api resources.
|
// Kustomization holds the information needed to generate customized k8s api resources.
|
||||||
|
|||||||
Reference in New Issue
Block a user