meta

package
v0.0.0-...-3df40d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright 2022 Google LLC

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.

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.

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsClusterScoped

func IsClusterScoped(gvk schema.GroupVersionKind) (bool, error)

IsClusterScoped returns true if the specified GVK is cluster scoped, or an error if this cannot be determined.

func VisitRefs

func VisitRefs(objects fn.KubeObjects, visitor func(ref Ref) error) error

VisitRefs will invoke the callback function for every reference discovered in the specified objects.

Types

type Ref

type Ref interface {
	GroupKind() schema.GroupKind
	GroupVersionKind() schema.GroupVersionKind
	GetName() string
	GetNamespace() string
	SetName(name string)
	SetNamespace(namespace string) error
}

Ref is an interface representing a reference to another object. A Ref might be a full ObjectReference-style reference, or a shorter reference like metadata.namespace or serviceAccountName in a PodTemplate. We expose methods like SetNamespace; these will return an error if the reference type does not support changing the namespace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL