import "istio.io/istio/operator/pkg/name"
const ( CRDStr = "CustomResourceDefinition" ClusterRoleStr = "ClusterRole" ClusterRoleBindingStr = "ClusterRoleBinding" CMStr = "ConfigMap" DaemonSetStr = "DaemonSet" DeploymentStr = "Deployment" EndpointStr = "Endpoints" HPAStr = "HorizontalPodAutoscaler" IngressStr = "Ingress" MutatingWebhookConfigurationStr = "MutatingWebhookConfiguration" NamespaceStr = "Namespace" PVCStr = "PersistentVolumeClaim" PodStr = "Pod" PDBStr = "PodDisruptionBudget" ReplicationControllerStr = "ReplicationController" ReplicaSetStr = "ReplicaSet" RoleStr = "Role" RoleBindingStr = "RoleBinding" SAStr = "ServiceAccount" ServiceStr = "Service" SecretStr = "Secret" StatefulSetStr = "StatefulSet" ValidatingWebhookConfigurationStr = "ValidatingWebhookConfiguration" )
Kubernetes Kind strings.
const ( EnvoyFilterStr = "EnvoyFilter" GatewayStr = "Gateway" DestinationRuleStr = "DestinationRule" MeshPolicyStr = "MeshPolicy" PeerAuthenticationStr = "PeerAuthentication" VirtualServiceStr = "VirtualService" IstioOperatorStr = "IstioOperator" )
Istio Kind strings
const ( AuthenticationAPIGroupName = "authentication.istio.io" ConfigAPIGroupName = "config.istio.io" NetworkingAPIGroupName = "networking.istio.io" OperatorAPIGroupName = "operator.istio.io" SecurityAPIGroupName = "security.istio.io" )
Istio API Group Names
const ( // OperatorAPINamespace is the API namespace for operator config. // TODO: move this to a base definitions file when one is created. OperatorAPINamespace = OperatorAPIGroupName // DefaultProfileName is the name of the default profile. DefaultProfileName = "default" // installedSpecCRPrefix is the prefix of any IstioOperator CR stored in the cluster that is a copy of the CR used // in the last install operation. InstalledSpecCRPrefix = "installed-state" )
const (
IstioDefaultNamespace = "istio-system"
)
Istio default namespace
var ( AllCoreComponentNames = []ComponentName{ IstioBaseComponentName, PilotComponentName, CNIComponentName, IstiodRemoteComponentName, } // AllComponentNames is a list of all Istio components. AllComponentNames = append(AllCoreComponentNames, IngressComponentName, EgressComponentName, IstioOperatorComponentName, IstioOperatorCustomResourceName) // ValuesEnablementPathMap defines a mapping between legacy values enablement paths and the corresponding enablement // paths in IstioOperator. ValuesEnablementPathMap = map[string]string{ "spec.values.gateways.istio-ingressgateway.enabled": "spec.components.ingressGateways.[name:istio-ingressgateway].enabled", "spec.values.gateways.istio-egressgateway.enabled": "spec.components.egressGateways.[name:istio-egressgateway].enabled", } )
MergeManifestSlices merges a slice of manifests into a single manifest string.
func Namespace(componentName ComponentName, controlPlaneSpec *v1alpha1.IstioOperatorSpec) (string, error)
Namespace returns the namespace for the component. It follows these rules: 1. If DefaultNamespace is unset, log and error and return the empty string. 2. If the feature and component namespaces are unset, return DefaultNamespace. 3. If the feature namespace is set but component name is unset, return the feature namespace. 4. Otherwise return the component namespace. Namespace assumes that controlPlaneSpec has been validated. TODO: remove extra validations when comfort level is high enough.
func UserFacingComponentName(name ComponentName) string
UserFacingComponentName returns the name of the given component that should be displayed to the user in high level CLIs (like progress log).
ComponentName is a component name string, typed to constrain allowed values.
const ( // IstioComponent names corresponding to the IstioOperator proto component names. Must be the same, since these // are used for struct traversal. IstioBaseComponentName ComponentName = "Base" PilotComponentName ComponentName = "Pilot" CNIComponentName ComponentName = "Cni" // istiod remote component IstiodRemoteComponentName ComponentName = "IstiodRemote" // Gateway components IngressComponentName ComponentName = "IngressGateways" EgressComponentName ComponentName = "EgressGateways" // Operator components IstioOperatorComponentName ComponentName = "IstioOperator" IstioOperatorCustomResourceName ComponentName = "IstioOperatorCustomResource" )
func TitleCase(n ComponentName) ComponentName
TitleCase returns a capitalized version of n.
func (cn ComponentName) IsGateway() bool
IsGateway reports whether cn is a gateway component.
ComponentNamesConfig is used for unmarshaling legacy and addon naming data.
type Manifest struct { Name ComponentName Content string }
Manifest defines a manifest for a component.
type ManifestMap map[ComponentName][]string
ManifestMap is a map of ComponentName to its manifest string.
func (mm ManifestMap) Consolidated() map[string]string
Consolidated returns a representation of mm where all manifests in the slice under a key are combined into a single manifest.
func (mm ManifestMap) String() string
String implements the Stringer interface.
Package name imports 6 packages (graph) and is imported by 12 packages. Updated 2020-12-08. Refresh now. Tools for package owners.