Skip to content

Commit 44e912c

Browse files
committed
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernetes-operator into develop-operator-helm-chart-values-cleanup
2 parents fbfe09a + 94694d9 commit 44e912c

File tree

80 files changed

+753
-1351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+753
-1351
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Operator.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -209,30 +209,7 @@ private void callHelmInstall() throws Exception {
209209
}
210210

211211
private void reportHelmInstallFailure(String cmd, ExecResult result) throws Exception {
212-
String cause = getExecFailure(cmd, result);
213-
if (result.stderr().contains("Error: Job failed: BackoffLimitExceeded")) {
214-
// The operator helm chart pre-install hook probably failed.
215-
// This is probably because there is a problem with the values passed in,
216-
// for example a listed domain namespace does not exist.
217-
// Fetch the pre-install hook's results and return it too.
218-
String hookResults = getOperatorHelmChartHookResults("pre-install");
219-
cause = cause + "\n pre-install-hook returned\n" + hookResults;
220-
}
221-
throw new RuntimeException(cause);
222-
}
223-
224-
private String getOperatorHelmChartHookResults(String hookType) throws Exception {
225-
String cmd =
226-
"kubectl logs job/"
227-
+ operatorMap.get("releaseName")
228-
+ "-weblogic-operator-"
229-
+ hookType
230-
+ "-hook -n kube-system";
231-
ExecResult result = ExecCommand.exec(cmd);
232-
if (result.exitValue() != 0) {
233-
return getExecFailure(cmd, result);
234-
}
235-
return result.stdout();
212+
throw new RuntimeException(getExecFailure(cmd, result));
236213
}
237214

238215
private String getExecFailure(String cmd, ExecResult result) throws Exception {

kubernetes/charts/weblogic-operator/templates/_operator-verification-hook.tpl

Lines changed: 0 additions & 45 deletions
This file was deleted.

kubernetes/charts/weblogic-operator/templates/_validate-inputs.tpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
{{- $ignore := include "utils.verifyInteger" (list $scope "elasticSearchPort") -}}
3434
{{- end -}}
3535
{{- end -}}
36-
{{- $ignore := include "utils.verifyString" (list $scope "tillerNamespace") -}}
37-
{{- $ignore := include "utils.verifyString" (list $scope "tillerServiceAccount") -}}
3836
{{- $ignore := include "utils.verifyOptionalBoolean" (list $scope "mockWLS") -}}
3937
{{- $ignore:= include "utils.endValidation" $scope -}}
40-
{{- include "operator.operatorVerificationHook" (list $scope "pre-upgrade") }}
41-
{{- include "operator.operatorVerificationHook" (list $scope "pre-install") }}
4238
{{- end -}}

kubernetes/charts/weblogic-operator/values.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,3 @@ elasticSearchHost: "elasticsearch.default.svc.cluster.local"
101101
# elasticSearchPort specifies the port number of where elasticsearch is running.
102102
# This parameter is ignored if 'elkIntegrationEnabled' is false.
103103
elasticSearchPort: 9200
104-
105-
# tillerNamespace is the name of the namespace that tiller is configured to use.
106-
tillerNamespace: "kube-system"
107-
108-
# tillerServiceAccount is the name of the service account that tiller is configured to use.
109-
tillerServiceAccount: "default"

kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/create-pv-pvc-inputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ weblogicDomainStorageType: HOST_PATH
2626

2727
# Physical path of the persistent storage.
2828
# The following line must be uncomment and customized:
29-
weblogicDomainStoragePath: /scratch/k8s_dir
29+
#weblogicDomainStoragePath: /scratch/k8s_dir
3030

3131
# Reclaim policy of the persistent storage
3232
# The valid values are: 'Retain', 'Delete', and 'Recycle'

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,6 @@ function createFiles {
285285
echo Generating ${domainPropertiesOutput}
286286

287287
cp ${domainPropertiesInput} ${domainPropertiesOutput}
288-
sed -i -e "s:%DOMAIN_NAME%:${domainName}:g" ${domainPropertiesOutput}
289-
sed -i -e "s:%ADMIN_PORT%:${adminPort}:g" ${domainPropertiesOutput}
290-
sed -i -e "s:%ADMIN_SERVER_NAME%:${adminServerName}:g" ${domainPropertiesOutput}
291-
sed -i -e "s:%MANAGED_SERVER_PORT%:${managedServerPort}:g" ${domainPropertiesOutput}
292-
sed -i -e "s:%MANAGED_SERVER_NAME_BASE%:${managedServerNameBase}:g" ${domainPropertiesOutput}
293288
sed -i -e "s:%CONFIGURED_MANAGED_SERVER_COUNT%:${configuredManagedServerCount}:g" ${domainPropertiesOutput}
294289
sed -i -e "s:%CLUSTER_NAME%:${clusterName}:g" ${domainPropertiesOutput}
295290
sed -i -e "s:%PRODUCTION_MODE_ENABLED%:${productionModeEnabled}:g" ${domainPropertiesOutput}

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/domain-template.yaml

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ metadata:
1111
labels:
1212
weblogic.resourceVersion: domain-v2
1313
weblogic.domainUID: %DOMAIN_UID%
14-
weblogic.domainName: %DOMAIN_NAME%
1514
spec:
16-
# The domainUID must be unique across the entire Kubernetes Cluster. Each WebLogic Domain must
17-
# have its own unique domainUID. This does not have to be the same as the Domain Name. It is allowed
18-
# to have multiple Domains with the same Domain Name, but they MUST have different domainUID's.
19-
# The domainUID is also used to identify the Persistent Volume that belongs to/with this Domain.
20-
domainUID: %DOMAIN_UID%
21-
# The WebLogic Domain Name
22-
domainName: %DOMAIN_NAME%
2315
# The WebLogic Domain Home
2416
domainHome: %DOMAIN_HOME%
2517
# If the domain home is in the image
@@ -32,10 +24,6 @@ spec:
3224
# how to create that Secret at the end of this file)
3325
adminSecret:
3426
name: %WEBLOGIC_CREDENTIALS_SECRET_NAME%
35-
# The name of the Admin Server
36-
asName: "%ADMIN_SERVER_NAME%"
37-
# The Admin Server's ListenPort
38-
asPort: %ADMIN_PORT%
3927
# Whether to include the server out file into the pod's stdout, default is true
4028
includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG%
4129
# serverStartPolicy legal values are "NEVER", "ALWAYS", "IF_NEEDED", or "ADMIN_ONLY"
@@ -44,47 +32,35 @@ spec:
4432
# - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started)
4533
# - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
4634
serverStartPolicy: "%SERVER_START_POLICY%"
35+
env:
36+
- name: JAVA_OPTIONS
37+
value: "%JAVA_OPTIONS%"
38+
- name: USER_MEM_ARGS
39+
value: "-Xms64m -Xmx256m "
40+
volumes:
41+
- name: runtime-properties
42+
hostPath:
43+
path: "%RUNTIME_PROPERTIES%"
44+
volumeMounts:
45+
- mountPath: "/u01/oracle/properties"
46+
name: runtime-properties
4747
# adminServer is used to configure the desired behavior for starting the administration server.
4848
adminServer:
49-
# serverStartState legal values are "RUNNING" or "ADMIN"
50-
# "RUNNING" means the listed server will be started up to "RUNNING" mode
51-
# "ADMIN" means the listed server will be start up to "ADMIN" mode
49+
# serverStartState legal values are "RUNNING" or "ADMIN"
50+
# "RUNNING" means the listed server will be started up to "RUNNING" mode
51+
# "ADMIN" means the listed server will be start up to "ADMIN" mode
5252
serverStartState: "RUNNING"
5353
# The Admin Server's NodePort
5454
%EXPOSE_ADMIN_PORT_PREFIX%nodePort: %ADMIN_NODE_PORT%
5555
# Uncomment to export the T3Channel as a service
5656
%EXPOSE_T3_CHANNEL_PREFIX%exportedNetworkAccessPoints:
5757
%EXPOSE_T3_CHANNEL_PREFIX% T3Channel: {}
5858
# an (optional) list of environment variable to be set on the server
59-
env:
60-
- name: JAVA_OPTIONS
61-
value: "%JAVA_OPTIONS%"
62-
- name: USER_MEM_ARGS
63-
value: "-Xms64m -Xmx256m "
64-
volumes:
65-
- name: runtime-properties
66-
hostPath:
67-
path: "%RUNTIME_PROPERTIES%"
68-
volumeMounts:
69-
- name: runtime-properties
70-
mountPath: "/u01/oracle/properties"
7159
# clusters is used to configure the desired behavior for starting member servers of a cluster.
7260
# If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters.
7361
clusters:
7462
%CLUSTER_NAME%:
7563
serverStartState: "RUNNING"
7664
replicas: %INITIAL_MANAGED_SERVER_REPLICAS%
77-
env:
78-
- name: JAVA_OPTIONS
79-
value: "%JAVA_OPTIONS%"
80-
- name: USER_MEM_ARGS
81-
value: "-Xms64m -Xmx256m "
82-
volumes:
83-
- name: runtime-properties
84-
hostPath:
85-
path: "%RUNTIME_PROPERTIES%"
86-
volumeMounts:
87-
- name: runtime-properties
88-
mountPath: "/u01/oracle/properties"
8965
# The number of managed servers to start from clusters not listed in clusters
9066
# replicas: 1

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,10 @@ function createYamlFiles {
390390
sed -i -e "s:%WEBLOGIC_CREDENTIALS_SECRET_NAME%:${weblogicCredentialsSecretName}:g" ${dcrOutput}
391391
sed -i -e "s:%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%:${imagePullSecretPrefix}:g" ${dcrOutput}
392392
sed -i -e "s:%DOMAIN_UID%:${domainUID}:g" ${dcrOutput}
393-
sed -i -e "s:%DOMAIN_NAME%:${domainName}:g" ${dcrOutput}
394393
sed -i -e "s:%DOMAIN_HOME%:${domainHome}:g" ${dcrOutput}
395-
sed -i -e "s:%ADMIN_SERVER_NAME%:${adminServerName}:g" ${dcrOutput}
396394
sed -i -e "s:%WEBLOGIC_IMAGE%:${image}:g" ${dcrOutput}
397395
sed -i -e "s:%WEBLOGIC_IMAGE_PULL_POLICY%:${imagePullPolicy}:g" ${dcrOutput}
398396
sed -i -e "s:%WEBLOGIC_IMAGE_PULL_SECRET_NAME%:${imagePullSecretName}:g" ${dcrOutput}
399-
sed -i -e "s:%ADMIN_PORT%:${adminPort}:g" ${dcrOutput}
400397
sed -i -e "s:%INITIAL_MANAGED_SERVER_REPLICAS%:${initialManagedServerReplicas}:g" ${dcrOutput}
401398
sed -i -e "s:%EXPOSE_T3_CHANNEL_PREFIX%:${exposeAdminT3ChannelPrefix}:g" ${dcrOutput}
402399
sed -i -e "s:%CLUSTER_NAME%:${clusterName}:g" ${dcrOutput}

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/domain-template.yaml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ metadata:
1212
labels:
1313
weblogic.resourceVersion: domain-v2
1414
weblogic.domainUID: %DOMAIN_UID%
15-
weblogic.domainName: %DOMAIN_NAME%
1615
spec:
17-
# The domainUID must be unique across the entire Kubernetes Cluster. Each WebLogic Domain must
18-
# have its own unique domainUID. This does not have to be the same as the Domain Name. It is allowed
19-
# to have multiple Domains with the same Domain Name, but they MUST have different domainUID's.
20-
# The domainUID is also used to identify the Persistent Volume that belongs to/with this Domain.
21-
domainUID: %DOMAIN_UID%
22-
# The WebLogic Domain Name
23-
domainName: %DOMAIN_NAME%
2416
# The WebLogic Domain Home
2517
domainHome: %DOMAIN_HOME%
2618
# If the domain home is in the image
@@ -36,10 +28,6 @@ spec:
3628
# how to create that Secret at the end of this file)
3729
adminSecret:
3830
name: %WEBLOGIC_CREDENTIALS_SECRET_NAME%
39-
# The name of the Admin Server
40-
asName: "%ADMIN_SERVER_NAME%"
41-
# The Admin Server's ListenPort
42-
asPort: %ADMIN_PORT%
4331
# Whether to include the server out file into the pod's stdout, default is true
4432
includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG%
4533
# The in-pod name of the directory to store the domain, node manager, server logs, and server .out
@@ -61,9 +49,10 @@ spec:
6149
value: "-Xms64m -Xmx256m "
6250
# adminServer is used to configure the desired behavior for starting the administration server.
6351
adminServer:
64-
# serverStartState legal values are "RUNNING" or "ADMIN"
65-
# "RUNNING" means the listed server will be started up to "RUNNING" mode
66-
# "ADMIN" means the listed server will be start up to "ADMIN" mode
52+
# serverStartState legal values are "RUNNING" or "ADMIN"
53+
# "RUNNING" means the listed server will be started up to "RUNNING" mode
54+
# "ADMIN" means the listed server will be start up to "ADMIN" mode
55+
serverStartState: "RUNNING"
6756
# The Admin Server's NodePort
6857
%EXPOSE_ADMIN_PORT_PREFIX%nodePort: %ADMIN_NODE_PORT%
6958
# Uncomment to export the T3Channel as a service

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import io.kubernetes.client.models.ExtensionsV1beta1Deployment;
1515
import io.kubernetes.client.models.V1Container;
16-
import io.kubernetes.client.models.V1Job;
1716
import io.kubernetes.client.models.V1Service;
1817
import oracle.kubernetes.operator.utils.OperatorYamlFactory;
1918

@@ -51,18 +50,6 @@ protected V1Service getExpectedExternalWeblogicOperatorService() {
5150
return getExpectedExternalWeblogicOperatorService(true, true);
5251
}
5352

54-
@Override
55-
protected V1Job getExpectedWeblogicOperatorHookJob(String hookType) {
56-
V1Job expected = super.getExpectedWeblogicOperatorHookJob(hookType);
57-
expected
58-
.getSpec()
59-
.getTemplate()
60-
.getSpec()
61-
.addImagePullSecretsItem(
62-
newLocalObjectReference().name(getInputs().getWeblogicOperatorImagePullSecretName()));
63-
return expected;
64-
}
65-
6653
@Override
6754
public ExtensionsV1beta1Deployment getExpectedWeblogicOperatorDeployment() {
6855
ExtensionsV1beta1Deployment expected = super.getExpectedWeblogicOperatorDeployment();

0 commit comments

Comments
 (0)