-
Notifications
You must be signed in to change notification settings - Fork 423
/
Copy pathconstants.go
130 lines (91 loc) · 6.53 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package common
const (
// MCONamespace is the namespace that should be used for all API objects owned by the MCO by default
MCONamespace = "openshift-machine-config-operator"
// OpenshiftConfigManagedNamespace is the namespace that has the etc-pki-entitlement/Simple Content Access Cert
OpenshiftConfigManagedNamespace = "openshift-config-managed"
// SimpleContentAccessSecret is the secret that holds the SimpleContentAccess cert which provides RHEL entitlements
SimpleContentAccessSecretName = "etc-pki-entitlement"
// MachineAPINamespace is the namespace that should be used for all API objects owned by the machine api operator
MachineAPINamespace = "openshift-machine-api"
// GlobalPullSecretName is the name of the global pull secret
GlobalPullSecretName = "pull-secret"
// OpenshiftConfigNamespace is the namespace that has the global pull secret
OpenshiftConfigNamespace = "openshift-config"
// GlobalPullCopySecret is a copy of the cluster wide pull secret. In OCL, this is used if the base image pull secret is not provided.
GlobalPullSecretCopyName = "global-pull-secret-copy"
// GeneratedByControllerVersionAnnotationKey is used to tag the machineconfigs generated by the controller with the version of the controller.
GeneratedByControllerVersionAnnotationKey = "machineconfiguration.openshift.io/generated-by-controller-version"
// ReleaseImageVersionAnnotationKey is used to tag the rendered machineconfigs & controller config with the release image version.
ReleaseImageVersionAnnotationKey = "machineconfiguration.openshift.io/release-image-version"
// OSImageURLOverriddenKey is used to tag a rendered machineconfig when OSImageURL has been overridden from default using machineconfig
OSImageURLOverriddenKey = "machineconfiguration.openshift.io/os-image-url-overridden"
// ControllerConfigName is the name of the ControllerConfig object that controllers use
ControllerConfigName = "machine-config-controller"
// KernelTypeDefault denominates the default kernel type
KernelTypeDefault = "default"
// KernelTypeRealtime denominates the realtime kernel type
KernelTypeRealtime = "realtime"
// KernelType64kPages denominates the 64k pages kernel
KernelType64kPages = "64k-pages"
// MasterLabel defines the label associated with master node. The master taint uses the same label as taint's key
MasterLabel = "node-role.kubernetes.io/master"
// MCNameSuffixAnnotationKey is used to keep track of the machine config name associated with a CR
MCNameSuffixAnnotationKey = "machineconfiguration.openshift.io/mc-name-suffix"
// MaxMCNameSuffix is the maximum value of the name suffix of the machine config associated with kubeletconfig and containerruntime objects
MaxMCNameSuffix int = 9
// ClusterFeatureInstanceName is a singleton name for featureGate configuration
ClusterFeatureInstanceName = "cluster"
// ClusterNodeInstanceName is a singleton name for node configuration
ClusterNodeInstanceName = "cluster"
// APIServerInstanceName is a singleton name for APIServer configuration
APIServerInstanceName = "cluster"
// APIServerInstanceName is a singleton name for APIServer configuration
APIServerBootstrapFileLocation = "/etc/mcs/bootstrap/api-server/api-server.yaml"
// MachineConfigPoolArbiter is the MachineConfigPool name given to the arbiter
MachineConfigPoolArbiter = "arbiter"
// MachineConfigPoolMaster is the MachineConfigPool name given to the master
MachineConfigPoolMaster = "master"
// MachineConfigPoolWorker is the MachineConfigPool name given to the worker
MachineConfigPoolWorker = "worker"
// LayeringEnabledPoolLabel is the label that enables the "layered" workflow path for a pool.
LayeringEnabledPoolLabel = "machineconfiguration.openshift.io/layering-enabled"
RebuildPoolLabel = "machineconfiguration.openshift.io/rebuildImage"
// ExperimentalNewestLayeredImageEquivalentConfigAnnotationKey is the annotation that signifies which rendered config
// TODO(zzlotnik): Determine if we should use this still.
ExperimentalNewestLayeredImageEquivalentConfigAnnotationKey = "machineconfiguration.openshift.io/newestImageEquivalentConfig"
// InternalMCOIgnitionVersion is the ignition version that the MCO converts everything to internally. The intent here is that
// we should be able to update this constant when we bump the internal ignition version instead of having to hunt down all of
// the version references and figure out "was this supposed to be explicitly 3.5.0 or just the default version which happens
// to be 3.5.0 currently". Ideally if you find an explicit "3.5.0", it's supposed to be "3.5.0" version. If it's this constant,
// it's supposed to be the internal default version.
InternalMCOIgnitionVersion = "3.5.0"
// MachineConfigRoleLabel is the role on MachineConfigs, used to select for pools
MachineConfigRoleLabel = "machineconfiguration.openshift.io/role"
// BootImagesConfigMapName is a Configmap of golden bootimages, updated by CVO on an upgrade
BootImagesConfigMapName = "coreos-bootimages"
// MCOVersionHashKey is the key for indexing the MCO git version hash stored in the bootimages configmap
MCOVersionHashKey = "MCOVersionHash"
// MCOReleaseImageVersionKey is the key for indexing the MCO release version stored in the bootimages configmap
MCOReleaseImageVersionKey = "MCOReleaseImageVersion"
// MCOOperatorKnobsObjectName is the name of the global MachineConfiguration "knobs" object that the MCO watches.
MCOOperatorKnobsObjectName = "cluster"
ServiceCARotateAnnotation = "machineconfiguration.openshift.io/service-ca-rotate"
ServiceCARotateTrue = "true"
ServiceCARotateFalse = "false"
// This is where the installer generated MCS CA bundle was formally stored. This configmap is in the "kube-system" namespace.
RootCAConfigMapName = "root-ca"
// This is the name of the configmap bundle and secret where the rotated MCS CA will be stored, in the MCO namespace.
MachineConfigServerCAName = "machine-config-server-ca"
// This is the name of the secret which holds the MCS TLS cert. This is generated from the CAs listed above.
MachineConfigServerTLSSecretName = "machine-config-server-tls"
// This is the label applied to *-user-data-managed secrets
MachineConfigServerCAManagedByConfigMapKey = "machineconfiguration.openshift.io/managed-ca-bundle-derived-from-configmap"
)
// Commonly-used MCO ConfigMap names
const (
// The name of the machine-config-operator-images ConfigMap.
MachineConfigOperatorImagesConfigMapName string = "machine-config-operator-images"
// The name of the machine-config-osimageurl ConfigMap.
MachineConfigOSImageURLConfigMapName string = "machine-config-osimageurl"
)