github.com/verrazzano/verrazzano@v1.7.1/application-operator/constants/constants.go (about)

     1  // Copyright (c) 2021, 2023, Oracle and/or its affiliates.
     2  // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  package constants
     5  
     6  // VerrazzanoSystemNamespace is the system namespace for Verrazzano
     7  const VerrazzanoSystemNamespace = "verrazzano-system"
     8  
     9  // VerrazzanoMultiClusterNamespace is the multi-cluster namespace for Verrazzano
    10  const VerrazzanoMultiClusterNamespace = "verrazzano-mc"
    11  
    12  // MCAgentSecret contains information needed by the agent to access the admin cluster, such as the admin kubeconfig.
    13  // This secret is used by the MC agent running on the managed cluster.
    14  const MCAgentSecret = "verrazzano-cluster-agent" //nolint:gosec //#gosec G101
    15  
    16  // MCRegistrationSecret - the name of the secret that contains the cluster registration information
    17  const MCRegistrationSecret = "verrazzano-cluster-registration" //nolint:gosec //#gosec G101
    18  
    19  // MCLocalRegistrationSecret - the name of the local secret that contains the cluster registration information.
    20  // Thos is created at Verrazzano install.
    21  const MCLocalRegistrationSecret = "verrazzano-local-registration" //nolint:gosec //#gosec G101
    22  
    23  // ClusterNameData - the field name in MCRegistrationSecret that contains this managed cluster's name
    24  const ClusterNameData = "managed-cluster-name"
    25  
    26  // ElasticsearchURLData - the field name in MCRegistrationSecret that contains the admin cluster's
    27  // Elasticsearch endpoint's URL
    28  const ElasticsearchURLData = "es-url"
    29  
    30  // ElasticsearchUsernameData - the field name in MCRegistrationSecret that contains the admin
    31  // cluster's Elasticsearch username
    32  const ElasticsearchUsernameData = "username"
    33  
    34  // ElasticsearchPasswordData - the field name in MCRegistrationSecret that contains the admin
    35  // cluster's Elasticsearch password
    36  const ElasticsearchPasswordData = "password"
    37  
    38  // LabelVerrazzanoManagedDefault - default value for LabelVerrazzanoManaged
    39  const LabelVerrazzanoManagedDefault = "true"
    40  
    41  // LabelIstioInjection - constant for a Kubernetes label that is applied by Verrazzano
    42  const LabelIstioInjection = "istio-injection"
    43  
    44  // LabelVerrazzanoNamespace - constant for a Kubernetes label that is used by network policies
    45  const LabelVerrazzanoNamespace = "verrazzano.io/namespace"
    46  
    47  // LabelIstioInjectionDefault - default value for LabelIstioInjection
    48  const LabelIstioInjectionDefault = "enabled"
    49  
    50  // LabelWorkloadType - the type of workload, such as WebLogic
    51  const LabelWorkloadType = "verrazzano.io/workload-type"
    52  
    53  // LabelIngressTraitNsn - Namespaced name of the ingress trait
    54  const LabelIngressTraitNsn = "verrazzano.io/ingress-trait"
    55  
    56  // WorkloadTypeWeblogic indicates the workload is WebLogic
    57  const WorkloadTypeWeblogic = "weblogic"
    58  
    59  // StatusUpdateChannelBufferSize - the number of status update messages that will be buffered
    60  // by the agent channel before controllers trying to send more status updates will start blocking
    61  const StatusUpdateChannelBufferSize = 50
    62  
    63  // StatusUpdateBatchSize - the number of status update messages the multi cluster agent should
    64  // process each time it wakes up
    65  const StatusUpdateBatchSize = 10
    66  
    67  // VzConsoleIngress - the name of the ingress for Verrazzano console and api
    68  const VzConsoleIngress = "verrazzano-ingress"
    69  
    70  // IstioSystemNamespace - the Istio system namespace
    71  const IstioSystemNamespace = "istio-system"
    72  
    73  // DefaultClusterName - the default cluster name
    74  const DefaultClusterName = "local"
    75  
    76  // VzPrometehusIngress - the name of the ingress for system vmi prometheus
    77  const VzPrometheusIngress = "vmi-system-prometheus"
    78  
    79  // ClusterNameEnvVar is the environment variable used to identify the managed cluster for fluentd
    80  const FluentdClusterNameEnvVar = "CLUSTER_NAME"
    81  
    82  // FluentdElasticsearchURLEnvVar is the environment variable name used to identify the admin cluster's
    83  // Elasticsearch URL for fluentd
    84  const FluentdElasticsearchURLEnvVar = "ELASTICSEARCH_URL"
    85  
    86  // FluentdElasticsearchUserEnvVar is the environment variable name used to identify the admin cluster's
    87  // Elasticsearch username for fluentd
    88  const FluentdElasticsearchUserEnvVar = "ELASTICSEARCH_USER"
    89  
    90  // FluentdElasticsearchPwdEnvVar is the environment variable name used to identify the admin cluster's
    91  // Elasticsearch password for fluentd
    92  const FluentdElasticsearchPwdEnvVar = "ELASTICSEARCH_PASSWORD"
    93  
    94  // VerrazzanoUsernameData - the field name in Verrazzano secret that contains the username
    95  const VerrazzanoUsernameData = "username"
    96  
    97  // VerrazzanoPasswordData - the field name in Verrazzano secret that contains the password
    98  const VerrazzanoPasswordData = "password"
    99  
   100  // MetricsWorkloadLabel - the label for identifying a pods scrape target
   101  const MetricsWorkloadLabel = "app.verrazzano.io/workload"
   102  
   103  // Webhook success status
   104  const StatusReasonSuccess = "success"
   105  
   106  // OCILoggingIDAnnotation Annotation name for a customized OCI log ID for all containers in a namespace
   107  const OCILoggingIDAnnotation = "verrazzano.io/oci-log-id"
   108  
   109  // WorkloadTypeCoherence indicates the workload is Coherence
   110  const WorkloadTypeCoherence = "coherence"
   111  
   112  // WorkloadTypeGeneric indicates the workload is generic (one of VerrazzanoHelidonWorkload, ContainerizedWorkload or Deployment)
   113  const WorkloadTypeGeneric = "generic"
   114  
   115  // VerrazzanoLocalCABundleSecret is the name of the secret in the verrazzano-mc namespace on an admin cluster that contains the cluster's ca bundle
   116  const VerrazzanoLocalCABundleSecret = "verrazzano-local-ca-bundle" //nolint:gosec //#gosec G101
   117  
   118  // LegacyDefaultMetricsTemplateName is the name of the default metrics template used for standard
   119  // Kubernetes workloads (legacy as of VZ 1.4)
   120  const LegacyDefaultMetricsTemplateName = "standard-k8s-metrics-template"
   121  
   122  // LegacyDefaultMetricsTemplateNamespace is the namespace containing the default metrics template
   123  // used for standard Kubernetes workloads (legacy as of VZ 1.4)
   124  const LegacyDefaultMetricsTemplateNamespace = VerrazzanoSystemNamespace
   125  
   126  // DefaultScraperName is the default Prometheus deployment name used to scrape metrics. If a metrics trait does not specify a scraper, this
   127  // is the scraper that will be used.
   128  const DefaultScraperName = "verrazzano-system/vmi-system-prometheus-0"