Skip to content

Commit ac825c1

Browse files
committed
Checkpoint k8s artifact renaming work
1 parent e5aad4b commit ac825c1

15 files changed

+81
-48
lines changed

kubernetes/internal/create-weblogic-domain-job-template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
apiVersion: v1
44
kind: ConfigMap
55
metadata:
6-
name: domain-%DOMAIN_UID%-scripts
6+
name: %DOMAIN_UID%-create-weblogic-domain-job-config-map
77
namespace: %NAMESPACE%
88
labels:
99
weblogic.domainUID: %DOMAIN_UID%
@@ -508,13 +508,13 @@ data:
508508
apiVersion: batch/v1
509509
kind: Job
510510
metadata:
511-
name: domain-%DOMAIN_UID%-job
511+
name: %DOMAIN_UID%-create-weblogic-domain-job
512512
namespace: %NAMESPACE%
513513
spec:
514514
template:
515515
metadata:
516516
labels:
517-
app: domain-%DOMAIN_UID%-job
517+
app: %DOMAIN_UID%-create-weblogic-domain-job
518518
weblogic.domainUID: %DOMAIN_UID%
519519
spec:
520520
restartPolicy: Never
@@ -539,7 +539,7 @@ spec:
539539
volumes:
540540
- name: config-map-scripts
541541
configMap:
542-
name: domain-%DOMAIN_UID%-scripts
542+
name: %DOMAIN_UID%-create-weblogic-domain-job-config-map
543543
- name: pv-storage
544544
persistentVolumeClaim:
545545
claimName: %DOMAIN_UID%-weblogic-domain-pvc

kubernetes/internal/traefik-template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ spec:
3333
terminationGracePeriodSeconds: 60
3434
containers:
3535
- image: traefik:1.4.5
36-
name: %DOMAIN_UID%-%CLUSTER_NAME_LC%-traefik
36+
name: traefik
3737
resources:
3838
requests:
3939
cpu: "100m"
@@ -72,12 +72,12 @@ spec:
7272
volumes:
7373
- name: config
7474
configMap:
75-
name: %DOMAIN_UID%-%CLUSTER_NAME_LC%-traefik
75+
name: %DOMAIN_UID%-%CLUSTER_NAME_LC%-traefik-config-map
7676
---
7777
apiVersion: v1
7878
kind: ConfigMap
7979
metadata:
80-
name: %DOMAIN_UID%-%CLUSTER_NAME_LC%-traefik
80+
name: %DOMAIN_UID%-%CLUSTER_NAME_LC%-traefik-config-map
8181
namespace: %NAMESPACE%
8282
labels:
8383
app: %DOMAIN_UID%-%CLUSTER_NAME_LC%-traefik

kubernetes/internal/weblogic-operator-template.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
apiVersion: v1
1212
kind: ConfigMap
1313
metadata:
14-
name: operator-config-map
14+
name: weblogic-operator-config-map
1515
namespace: %NAMESPACE%
1616
data:
1717
serviceaccount: %ACCOUNT_NAME%
@@ -23,7 +23,7 @@ data:
2323
apiVersion: v1
2424
kind: Secret
2525
metadata:
26-
name: operator-secrets
26+
name: weblogic-operator-secrets
2727
namespace: %NAMESPACE%
2828
type: Opaque
2929
data:
@@ -104,10 +104,10 @@ spec:
104104
volumes:
105105
- name: operator-config-volume
106106
configMap:
107-
name: operator-config-map
107+
name: weblogic-operator-config-map
108108
- name: operator-secrets-volume
109109
secret:
110-
secretName: operator-secrets
110+
secretName: weblogic-operator-secrets
111111
# Uncomment this volume if using ELK integration:
112112
%ELK_INTEGRATION_PREFIX%- name: log-dir
113113
%ELK_INTEGRATION_PREFIX% emptyDir:
@@ -128,7 +128,7 @@ spec:
128128
%EXTERNAL_OPERATOR_SERVICE_PREFIX% ports:
129129
%EXTERNAL_OPERATOR_SERVICE_PREFIX% %EXTERNAL_REST_NODE_PORT_PREFIX%- port: 8081
130130
%EXTERNAL_OPERATOR_SERVICE_PREFIX% %EXTERNAL_REST_NODE_PORT_PREFIX% nodePort: %EXTERNAL_REST_HTTPS_PORT%
131-
%EXTERNAL_OPERATOR_SERVICE_PREFIX% %EXTERNAL_REST_NODE_PORT_PREFIX% name: rest-https
131+
%EXTERNAL_OPERATOR_SERVICE_PREFIX% %EXTERNAL_REST_NODE_PORT_PREFIX% name: rest
132132
%EXTERNAL_OPERATOR_SERVICE_PREFIX% #### uncomment this port if you enable remote debugging, and make sure the value matches
133133
%EXTERNAL_OPERATOR_SERVICE_PREFIX% #### the one you defined above
134134
%EXTERNAL_OPERATOR_SERVICE_PREFIX% %REMOTE_DEBUG_NODE_PORT_PREFIX%- port: %INTERNAL_DEBUG_HTTP_PORT%
@@ -147,5 +147,5 @@ spec:
147147
app: weblogic-operator
148148
ports:
149149
- port: 8082
150-
name: rest-https
150+
name: rest
151151

site/creating-domain.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ Here is the first part of that YAML file:
192192
apiVersion: batch/v1
193193
kind: Job
194194
metadata:
195-
name: domain-domain1-job
195+
name: domain1-create-weblogic-domain-job
196196
namespace: domain1
197197
spec:
198198
template:
199199
metadata:
200200
labels:
201-
app: domain-domain1-job
201+
app: domain1-create-weblogic-domain-job
202202
weblogic.domainUID: domain1
203203
spec:
204204
restartPolicy: Never
@@ -223,7 +223,7 @@ spec:
223223
volumes:
224224
- name: config-map-scripts
225225
configMap:
226-
name: domain-domain1-scripts
226+
name: domain1-create-weblogic-domain-job-config-map
227227
- name: pv-storage
228228
persistentVolumeClaim:
229229
claimName: domain1-pv001-claim

site/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ The spec section provides details for the container that the operator will execu
216216
volumes:
217217
- name: operator-config-volume
218218
configMap:
219-
name: operator-config-map
219+
name: weblogic-operator-config-map
220220
- name: operator-secrets-volume
221221
secret:
222-
weblogicCredentialsSecretName: operator-secrets
222+
weblogicCredentialsSecretName: weblogic-operator-secrets
223223
# Uncomment this volume if using ELK integration:
224224
# - name: log-dir
225225
# emptyDir:
@@ -248,7 +248,7 @@ spec:
248248
ports:
249249
- port: 8081
250250
nodePort: 31001
251-
name: rest-https
251+
name: rest
252252
# - port: 30999
253253
# nodePort: 30999
254254
# name: debug
@@ -269,7 +269,7 @@ spec:
269269
app: weblogic-operator
270270
ports:
271271
- port: 8082
272-
name: rest-https
272+
name: rest
273273
```
274274

275275
This section creates a ConfigMap that passes configuration information to the operator including the list of namespaces in which the operator will manage domains, the service account that the operator will use to authenticate to the Kubernetes API server, and the certificates that the operator’s REST server will use.
@@ -279,7 +279,7 @@ This section creates a ConfigMap that passes configuration information to the op
279279
apiVersion: v1
280280
kind: ConfigMap
281281
metadata:
282-
name: operator-config-map
282+
name: weblogic-operator-config-map
283283
namespace: weblogic-operator
284284
data:
285285
serviceaccount: weblogic-operator
@@ -295,7 +295,7 @@ This section defines a secret that contains the keys needed by the operator for
295295
apiVersion: v1
296296
kind: Secret
297297
metadata:
298-
name: operator-secrets
298+
name: weblogic-operator-secrets
299299
namespace: weblogic-operator
300300
type: Opaque
301301
data:

site/name-changes.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,44 @@ The following input properties, which used to have default values, now must be u
160160
| persistenceType | weblogicDomainStorageType | nfs | NFS |
161161

162162
## Kubernetes Artifact Names
163-
The input properties for controlling the domain's persistent volume, persistent volume claim and storage class names have been removed. These names are now derived from the domain uid.
164163

165164
| Artifact Type | Previous Name | New Name |
166165
| --- | --- | --- |
167166
| persistent volume | ${domainUid}-${persistenceVolume} or ${persistenceVolume} | ${domainUID}-weblogic-domain-pv |
168167
| persistent volume claim | ${domainUid}-${persistenceVolumeClaim} or ${persistenceVolumeClaim} | ${domainUID}-weblogic-domain-pvc |
169168
| storage class name | ${domainUid} or ${persistenceStorageClass} | ${domainUID-weblogic-domain-storage-class |
169+
| job | domain-${domainUid}-job | ${domainUID}-create-weblogic-domain-job |
170+
| container | ${d.domainUID}-${d.clusterName, lower case}-traefik | traefik |
171+
| config map | operator-config-map | weblogic-operator-config-map |
172+
| config map | ${domainUid}-${clusterName, lower case}-traefik | ${domainUID}-${clusterName, lower case}-traefik-config-map |
173+
| config map | domain-${domainUid}-scripts | ${domainUID}-create-weblogic-domain-job-config-map |
174+
| secret | operator-secrets | weblogic-operator-secrets |
175+
| port | rest-https | rest |
176+
| n volume | operator-config-volume | weblogic-operator-config-map-volume |
177+
| n volume | operator-secrets-volume | weblogic-operator-secrets-volume |
178+
| n volume | config-map-scripts | create-weblogic-domain-job-config-map-volume |
179+
| n volume | pv-storage | weblogic-domain-storage-volume |
180+
| n volume | secrets | weblogic-credentials-volume |
181+
| n volume | scripts | weblogic-domain-config-map-volume |
182+
183+
Temp note: weblogic-domain-config-map is created on the fly by ConfigMapHelper.java. It's referenced by weblogic-domain-config-map-volume.
184+
185+
TBD - we're appending type to:
186+
- config maps
187+
- secrets
188+
- pvs (global)
189+
- pvcs
190+
- storage classes
191+
- jobs
192+
but not to:
193+
- namespaces (global)
194+
- deployments
195+
- pods
196+
- services
197+
- service accounts
198+
- ports
199+
- maybe volumes
200+
- maybe volume mounts
201+
202+
Note: The input properties for controlling the domain's persistent volume, persistent volume claim and storage class names have been removed. These names are now derived from the domain uid.
170203

site/rest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Here is a small BASH script that may help to prepare the necessary token, certif
1818
KUBERNETES_SERVER=$1
1919
URL_TAIL=$2
2020
21-
REST_PORT=`kubectl get services -n weblogic-operator -o jsonpath='{.items[?(@.metadata.name == "external-weblogic-operator-service")].spec.ports[?(@.name == "rest-https")].nodePort}'`
21+
REST_PORT=`kubectl get services -n weblogic-operator -o jsonpath='{.items[?(@.metadata.name == "external-weblogic-operator-service")].spec.ports[?(@.name == "rest")].nodePort}'`
2222
REST_ADDR="https://${KUBERNETES_SERVER}:${REST_PORT}"
2323
SECRET=`kubectl get serviceaccount weblogic-operator -n weblogic-operator -o jsonpath='{.secrets[0].name}'`
2424
ENCODED_TOKEN=`kubectl get secret ${SECRET} -n weblogic-operator -o jsonpath='{.data.token}'`

src/integration-tests/bash/cleanup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function orderlyDelete {
194194
sleep 3
195195

196196
echo @@ Deleting create domain ${curdomain} job in namespace $curns
197-
kubectl -n $curns delete job domain-${curdomain}-job --ignore-not-found
197+
kubectl -n $curns delete job ${curdomain}-create-weblogic-domain-job --ignore-not-found
198198

199199
echo @@ Deleting domain pv and pvc for domain ${curdomain} in namespace $curns
200200
kubectl delete pv ${curdomain}-weblogic-domain-pv --ignore-not-found
@@ -207,8 +207,8 @@ function orderlyDelete {
207207
kubectlDeleteF "${USER_PROJECTS_DIR}/weblogic-domains/${curdomain}/traefik.yaml"
208208
kubectlDeleteF "${USER_PROJECTS_DIR}/weblogic-domains/${curdomain}/traefik-security.yaml"
209209

210-
echo @@ Deleting configmap domain-${curdomain}-scripts in namespace $curns
211-
kubectl -n $curns delete cm domain-${curdomain}-scripts --ignore-not-found
210+
echo @@ Deleting configmap ${curdomain}-create-weblogic-domain-job-config-map in namespace $curns
211+
kubectl -n $curns delete cm ${curdomain}-create-weblogic-domain-job-config-map --ignore-not-found
212212

213213
kubectl -n $curns delete deploy ${curdomain}-cluster-1-traefik --ignore-not-found=true
214214
kubectl -n $curns delete service ${curdomain}-cluster-1-traefik --ignore-not-found=true

src/main/scripts/scaling/scalingAction.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fi
111111
cat > cmds.py << INPUT
112112
import sys, json
113113
for i in json.load(sys.stdin)["spec"]["ports"]:
114-
if i["name"] == "rest-https":
114+
if i["name"] == "rest":
115115
print(i["port"])
116116
INPUT
117117
port=`echo ${STATUS} | python cmds.py`

src/test/java/oracle/kubernetes/operator/create/CreateDomainGeneratedFilesBaseTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ protected V1Job getExpectedCreateWeblogicDomainJob() {
149149
return
150150
newJob()
151151
.metadata(newObjectMeta()
152-
.name("domain-" + getInputs().getDomainUID() + "-job")
152+
.name(getInputs().getDomainUID() + "-create-weblogic-domain-job")
153153
.namespace(getInputs().getNamespace()))
154154
.spec(newJobSpec()
155155
.template(newPodTemplateSpec()
156156
.metadata(newObjectMeta()
157-
.putLabelsItem("app", "domain-" + getInputs().getDomainUID() + "-job")
157+
.putLabelsItem("app", getInputs().getDomainUID() + "-create-weblogic-domain-job")
158158
.putLabelsItem("weblogic.domainUID", getInputs().getDomainUID()))
159159
.spec(newPodSpec()
160160
.restartPolicy("Never")
@@ -181,7 +181,7 @@ protected V1Job getExpectedCreateWeblogicDomainJob() {
181181
.addVolumesItem(newVolume()
182182
.name("config-map-scripts")
183183
.configMap(newConfigMapVolumeSource()
184-
.name("domain-" + getInputs().getDomainUID() + "-scripts")))
184+
.name(getInputs().getDomainUID() + "-create-weblogic-domain-job-config-map")))
185185
.addVolumesItem(newVolume()
186186
.name("pv-storage")
187187
.persistentVolumeClaim(newPersistentVolumeClaimVolumeSource()
@@ -231,7 +231,7 @@ protected V1ConfigMap getExpectedCreateWeblogicDomainJobConfigMap() {
231231
return
232232
newConfigMap()
233233
.metadata(newObjectMeta()
234-
.name("domain-" + getInputs().getDomainUID() + "-scripts")
234+
.name(getInputs().getDomainUID() + "-create-weblogic-domain-job-config-map")
235235
.namespace(getInputs().getNamespace())
236236
.putLabelsItem("weblogic.domainUID", getInputs().getDomainUID()))
237237
.putDataItem(PROPERTY_UTILITY_SH, "")
@@ -447,7 +447,7 @@ protected ExtensionsV1beta1Deployment getExpectedTraefikDeployment() {
447447
.serviceAccountName(getTraefikScope())
448448
.terminationGracePeriodSeconds(60L)
449449
.addContainersItem(newContainer()
450-
.name(getTraefikScope())
450+
.name("traefik")
451451
.image("traefik:1.4.5")
452452
.resources(newResourceRequirements()
453453
.putRequestsItem("cpu", Quantity.fromString("100m"))
@@ -485,7 +485,7 @@ protected ExtensionsV1beta1Deployment getExpectedTraefikDeployment() {
485485
.addVolumesItem(newVolume()
486486
.name("config")
487487
.configMap(newConfigMapVolumeSource()
488-
.name(getTraefikScope()))))));
488+
.name(getTraefikScope() + "-config-map"))))));
489489
}
490490

491491
@Test
@@ -513,7 +513,7 @@ protected V1ConfigMap getExpectedTraefikConfigMap() {
513513
return
514514
newConfigMap()
515515
.metadata(newObjectMeta()
516-
.name(getTraefikScope())
516+
.name(getTraefikScope() + "-config-map")
517517
.namespace(getInputs().getNamespace())
518518
.putLabelsItem("weblogic.domainUID", getInputs().getDomainUID())
519519
.putLabelsItem("weblogic.clusterName", getClusterNameLC())

0 commit comments

Comments
 (0)