forked from jenkins-x/jx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.go
227 lines (156 loc) · 7.99 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
package kube
const (
// ChartAmbassador the default chart for ambassador
ChartAmbassador = "datawire/ambassador"
// ChartAnchore the default chart for the Anchore plugin
ChartAnchore = "stable/anchore-engine"
// ChartCloudBees the default name of the CloudBees addon chart
ChartCloudBees = "cb/cdx"
// ChartExposecontrollerService the default name of the Exposecontroller Service chart for Edit environments
ChartExposecontrollerService = "jenkins-x/exposecontroller-service"
// ChartAnchore the default chart for the Anchore plugin
ChartPipelineEvent = "jenkins-x/pipeline-events-addon"
// ChartGitea the default name of the gitea chart
ChartGitea = "jenkins-x/gitea"
// ChartIstio the default chart for the Istio chart
ChartIstio = "install/kubernetes/helm/istio"
// ChartKubeless the default chart for kubeless
ChartKubeless = "incubator/kubeless"
// ServiceJenkins is the name of the Jenkins Service
ServiceJenkins = "jenkins"
// SecretJenkins is the name of the Jenkins secret
SecretJenkins = "jenkins"
// ServiceCloudBees the service name of the CloudBees app for Kubernetes
ServiceCloudBees = "cb-cdx"
// ServiceChartMuseum the service name of the Helm Chart Museum service
ServiceChartMuseum = "jenkins-x-chartmuseum"
// ServiceKubernetesDashboard the kubernetes dashboard
ServiceKubernetesDashboard = "jenkins-x-kubernetes-dashboard"
// SecretJenkinsGitCredentials the git credentials secret
SecretJenkinsGitCredentials = "jenkins-git-credentials"
// SecretJenkinsChartMuseum the chart museum secret
SecretJenkinsChartMuseum = "jenkins-x-chartmuseum"
// SecretJenkinsReleaseGPG the GPG secrets for doing releases
SecretJenkinsReleaseGPG = "jenkins-release-gpg"
// SecretJenkinsPipelineAddonCredentials the chat credentials secret
SecretJenkinsPipelineAddonCredentials = "jx-pipeline-addon-"
// SecretJenkinsPipelineChatCredentials the chat credentials secret
SecretJenkinsPipelineChatCredentials = "jx-pipeline-chat-"
// SecretJenkinsPipelineGitCredentials the git credentials secret
SecretJenkinsPipelineGitCredentials = "jx-pipeline-git-"
// SecretJenkinsPipelineIssueCredentials the issue tracker credentials secret
SecretJenkinsPipelineIssueCredentials = "jx-pipeline-issues-"
// ConfigMapExposecontroller the name of the ConfigMap with the Exposecontroller configuration
ConfigMapExposecontroller = "exposecontroller"
// ConfigMapIngressConfig the new name of the ConfigMap with the Exposecontroller configuration
ConfigMapIngressConfig = "ingress-config"
// ConfigMapJenkinsX the name of the ConfigMap with the Jenkins configuration
ConfigMapJenkinsX = "jenkins"
// ConfigMapJenkinsPodTemplates is the ConfigMap containing all the Pod Templates available
ConfigMapJenkinsPodTemplates = "jenkins-x-pod-templates"
// ConfigMapJenkinsDockerRegistry is the ConfigMap containing the Docker Registry configuration
ConfigMapJenkinsDockerRegistry = "jenkins-x-docker-registry"
// ConfigMapNameJXInstallConfig is the ConfigMap containing the jx installation's CA and server url. Used by jx login
ConfigMapNameJXInstallConfig = "jx-install-config"
// LocalHelmRepoName is the default name of the local chart repository where CI/CD releases go to
LocalHelmRepoName = "releases"
// DeploymentExposecontrollerService the name of the Deployment for the Exposecontroller Service
DeploymentExposecontrollerService = "exposecontroller-service"
// DeploymentProwBuild the name of the Deployment for the Prow webhook engine
DeploymentProwBuild = "prow-build"
DefaultEnvironmentGitRepoURL = "https://github.com/jenkins-x/default-environment-charts.git"
DefaultOrganisationGitRepoURL = "https://github.com/jenkins-x/default-organisation.git"
// AnnotationTitle the human readable name of a resource which can include mixed case, spaces and punctuation
AnnotationTitle = "title"
// AnnotationDescription the tooltip / texual description of an resource
AnnotationDescription = "description"
// LabelKind to indicate the kind of auth, such as Git or Issue
LabelKind = "jenkins.io/kind"
// ValueKindAddon an addon auth secret/credentials
ValueKindAddon = "addon"
// ValueKindChat a chat auth secret/credentials
ValueKindChat = "chat"
// ValueKindGit a git auth secret/credentials
ValueKindGit = "git"
// ValueKindIssue an issue auth secret/credentials
ValueKindIssue = "issue"
// ValueKindCVE an addon auth secret/credentials
ValueKindCVE = "cve"
// ValueKindCVE an addon auth PipelineEvent
ValueKindPipelineEvent = "PipelineEvent"
// ValueKindEnvironmentRole to indicate a Role which maps to an EnvironmentRoleBinding
ValueKindEnvironmentRole = "EnvironmentRole"
// ValueKindCVE an addon auth PipelineEvent
ValueKindRelease = "Release"
// ValueKindEditNamespace for edit namespace
ValueKindEditNamespace = "editspace"
// LabelServiceKind the label to indicate the auto Server's Kind
LabelServiceKind = "jenkins.io/service-kind"
// LabelCreatedBy indicates the service that created this resource
LabelCreatedBy = "jenkins.io/created-by"
// LabelPodTemplate the name of the pod template for a DevPod
LabelPodTemplate = "jenkins.io/pod_template"
// LabelDevPodName the name of a dev pod
LabelDevPodName = "jenkins.io/devpod"
// LabelDevPodUsername the user name owner of the DeVPod
LabelDevPodUsername = "jenkins.io/devpod_user"
// LabelUsername the user name owner of a namespace or resource
LabelUsername = "jenkins.io/user"
// ValueCreatedByJX for resources created by the Jenkins X CLI
ValueCreatedByJX = "jx"
// LabelCredentialsType the kind of jenkins credential for a secret
LabelCredentialsType = "jenkins.io/credentials-type"
// ValueCredentialTypeUsernamePassword for user password credential secrets
ValueCredentialTypeUsernamePassword = "usernamePassword"
// LabelTeam indicates the team name an environment belongs to
LabelTeam = "team"
// LabelEnvironment indicates the name of the environment
LabelEnvironment = "env"
// LabelValueDevEnvironment is the value of the LabelTeam label for Development environments (system namespace)
LabelValueDevEnvironment = "dev"
// LabelJobKind the kind of job
LabelJobKind = "jenkins.io/job-kind"
// ValueJobKindPostPreview
ValueJobKindPostPreview = "post-preview-step"
// AnnotationURL indicates a service/server's URL
AnnotationURL = "jenkins.io/url"
// AnnotationExpose used to expose service using exposecontroller
AnnotationExpose = "fabric8.io/expose"
// AnnotationIngress tells exposecontroller to annotate generated ingress rule with values
AnnotationIngress = "fabric8.io/ingress.annotations"
// AnnotationName indicates a service/server's textual name (can be mixed case, contain spaces unlike kubernetes resources)
AnnotationName = "jenkins.io/name"
// AnnotationCredentialsDescription the description text for a Credential on a Secret
AnnotationCredentialsDescription = "jenkins.io/credentials-description"
// AnnotationWorkingDir the working directory, such as for a DevPod
AnnotationWorkingDir = "jenkins.io/working-dir"
// AnnotationLocalDir the local directory that is sync'd to the DevPod
AnnotationLocalDir = "jenkins.io/local-dir"
// AnnotationIsDefaultStorageClass used to indicate a storageclass is default
AnnotationIsDefaultStorageClass = "storageclass.kubernetes.io/is-default-class"
// SecretDataUsername the username in a Secret/Credentials
SecretDataUsername = "username"
// SecretDataPassword the password in a Secret/Credentials
SecretDataPassword = "password"
// SecretBasicAuth the name for the Jenkins X basic auth secret
SecretBasicAuth = "jx-basic-auth"
JenkinsAdminApiToken = "jenkins-admin-api-token"
AUTH = "auth"
)
var (
AddonCharts = map[string]string{
"ambassador": ChartAmbassador,
"anchore": ChartAnchore,
"cb": ChartCloudBees,
"gitea": ChartGitea,
"istio": ChartIstio,
"kubeless": ChartKubeless,
"prometheus": "stable/prometheus",
"grafana": "stable/grafana",
}
AddonServices = map[string]string{
"anchore": "anchore-anchore-engine",
"pipeline-events": "jx-pipeline-events-elasticsearch-client",
"grafana": "grafana",
}
)