kubernetes/vendor/sigs.k8s.io/kustomize/api/filters/namespace/namespace.go

type Filter

type RoleBindingSubjectMode

const DefaultSubjectsOnly

const SubjectModeUnspecified

const AllServiceAccountSubjects

const NoSubjects

var _

var _

// WithMutationTracker registers a callback which will be invoked each time a field is mutated
func (ns *Filter) WithMutationTracker(callback func(key, value, tag string, node *yaml.RNode)) {}

func (ns Filter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error) {}

// Run runs the filter on a single node rather than a slice
func (ns Filter) run(node *yaml.RNode) (*yaml.RNode, error) {}

// metaNamespaceHack is a hack for implementing the namespace transform
// for the metadata.namespace field on namespace scoped resources.
func (ns Filter) metaNamespaceHack(obj *yaml.RNode, gvk resid.Gvk) error {}

// roleBindingHack is a hack for implementing the transformer's SetRoleBindingSubjects option
// for RoleBinding and ClusterRoleBinding resource types.
//
// In NoSubjects mode, it does nothing.
//
// In AllServiceAccountSubjects mode, it sets the namespace on subjects with "kind: ServiceAccount".
//
// In DefaultSubjectsOnly mode (default mode), RoleBinding and ClusterRoleBinding have namespace set on
// elements of the "subjects" field if and only if the subject elements
// "name" is "default".  Otherwise the namespace is not set.
// Example:
//
// kind: RoleBinding
// subjects:
// - name: "default" # this will have the namespace set
//   ...
// - name: "something-else" # this will not have the namespace set
//   ...
func (ns Filter) roleBindingHack(obj *yaml.RNode) error {}

func isRoleBinding(kind string) bool {}

func (ns Filter) setServiceAccountNamespaces(o *yaml.RNode) error {}

func (ns Filter) setSubjectsNamedDefault(o *yaml.RNode) error {}

func setNamespaceField(node *yaml.RNode, setter filtersutil.SetFn) error {}

// removeRoleBindingSubjectFieldSpecs removes from the list fieldspecs that
// have hardcoded implementations
func (ns Filter) removeRoleBindingSubjectFieldSpecs(fs types.FsSlice) types.FsSlice {}

func (ns Filter) removeUnneededMetaFieldSpecs(apiVersion string, fs types.FsSlice) types.FsSlice {}

func (ns *Filter) fieldSetter() filtersutil.SetFn {}

const subjectsField

const subjectsNamespacePath

const roleBindingKind

const clusterRoleBindingKind