|
| 1 | +// Copyright 2019-2024 The Liqo 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 consts |
| 16 | + |
| 17 | +// Constants used to name and identify controllers. |
| 18 | +// Controller-runtime requires that each controller has a unique name within the container. |
| 19 | +// This name is used, for example, to identify a controller univocally in the logs |
| 20 | +// and must be a prometheus compatible name (underscores and alphanumeric characters only). |
| 21 | +// As a convention to avoid conflicts, we use the name of the reconciled resource (lowercase version of their kind), |
| 22 | +// and, if already used, we add a recognizable identifier, separated by the underscore character. |
| 23 | +// To catch duplicated names, we name the constant as its value (in CamelCase and stripping the separator character), |
| 24 | +// with the prefix "Ctrl". |
| 25 | +const ( |
| 26 | + // Core. |
| 27 | + CtrlForeignCluster = "foreigncluster" |
| 28 | + CtrlSecretCRDReplicator = "secret_crdreplicator" //nolint:gosec // not a credential |
| 29 | + |
| 30 | + // Networking. |
| 31 | + CtrlConfigurationExternal = "configuration_external" |
| 32 | + CtrlConfigurationInternal = "configuration_internal" |
| 33 | + CtrlConfigurationRemapping = "configuration_remapping" |
| 34 | + CtrlConfigurationRoute = "configuration_route" |
| 35 | + CtrlConnection = "connection" |
| 36 | + CtrlFirewallConfiguration = "firewallconfiguration" |
| 37 | + CtrlGatewayClientExternal = "gatewayclient_external" |
| 38 | + CtrlGatewayClientInternal = "gatewayclient_internal" |
| 39 | + CtrlGatewayServerExternal = "gatewayserver_external" |
| 40 | + CtrlGatewayServerInternal = "gatewayserver_internal" |
| 41 | + CtrlInternalFabricCM = "internalfabric_cm" |
| 42 | + CtrlInternalFabricFabric = "internalfabric_fabric" |
| 43 | + CtrlInternalNodeGeneve = "internalnode_geneve" |
| 44 | + CtrlInternalNodeRoute = "internalnode_route" |
| 45 | + CtrlIP = "ip" |
| 46 | + CtrlIPRemapping = "ip_remapping" |
| 47 | + CtrlNetwork = "network" |
| 48 | + CtrlNode = "node" |
| 49 | + CtrlPodGateway = "pod_gateway" |
| 50 | + CtrlPodGwMasq = "pod_gw_masq" |
| 51 | + CtrlPodInternalNet = "pod_internalnet" |
| 52 | + CtrlPublicKey = "publickey" |
| 53 | + CtrlRouteConfiguration = "routeconfiguration" |
| 54 | + CtrlWGGatewayClient = "wggatewayclient" |
| 55 | + CtrlWGGatewayServer = "wggatewayserver" |
| 56 | + |
| 57 | + // Authentication. |
| 58 | + CtrlIdentity = "identity" |
| 59 | + CtrlIdentityCreator = "identity_creator" |
| 60 | + CtrlSecretNonceCreator = "secret_noncecreator" |
| 61 | + CtrlSecretNonceSigner = "secret_noncesigner" |
| 62 | + CtrlResourceSliceLocal = "resourceslice_local" |
| 63 | + CtrlResourceSliceRemote = "resourceslice_remote" |
| 64 | + CtrlTenant = "tenant" |
| 65 | + |
| 66 | + // Offloading. |
| 67 | + CtrlNamespaceMap = "namespacemap" |
| 68 | + CtrlNamespaceOffloading = "namespaceoffloading" |
| 69 | + CtrlNodeFailure = "node_failure" |
| 70 | + CtrlPodStatus = "pod_status" |
| 71 | + CtrlShadowEndpointSlice = "shadowendpointslice" |
| 72 | + CtrlShadowPod = "shadowpod" |
| 73 | + CtrlVirtualNode = "virtualnode" |
| 74 | + |
| 75 | + // Cross modules. |
| 76 | + CtrlResourceSliceQuotaCreator = "resourceslice_quotacreator" |
| 77 | + CtrlResourceSliceVNCreator = "resourceslice_vncreator" |
| 78 | + CtrlPodIPMapping = "pod_ipmapping" |
| 79 | + CtrlConfigurationIPMapping = "configuration_ipmapping" |
| 80 | +) |
0 commit comments