Skip to content

Commit 6bcc4e0

Browse files
authored
Merge pull request #857 from oracle/gh-pages-OWLS-69849
Publish operator helm chart on our GitHub page
2 parents 583aef5 + f654e22 commit 6bcc4e0

File tree

7 files changed

+101
-4
lines changed

7 files changed

+101
-4
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,31 @@ Only pull requests from committers that can be verified as having signed the OCA
145145
## Introducing a new dependency
146146

147147
Please be aware that pull requests that seek to introduce a new dependency will be subject to additional review. In general, contributors should avoid dependencies with incompatible licenses, and should try to use recent versions of dependencies. Standard security vulnerability checklists will be consulted before accepting a new dependency. Dependencies on closed-source code, including WebLogic Server, will most likely be rejected.
148+
149+
## Use Helm Chart from Github chart repository
150+
151+
Add this repo to Helm installation:
152+
153+
```
154+
$ helm repo add weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/charts
155+
```
156+
157+
Verify repository was added correctly:
158+
159+
````
160+
$ helm repo list
161+
NAME URL
162+
weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/charts
163+
```
164+
165+
Update with latest information about charts from chart repositories:
166+
167+
```
168+
$ helm repo update
169+
```
170+
171+
Install Operator from the repo:
172+
173+
```
174+
$ helm install helm install weblogic-operator/weblogic-operator --name weblogic-operator
175+
```

docs/charts/index.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
entries:
3+
weblogic-operator:
4+
- created: 2019-02-06T10:58:20.175515059-08:00
5+
description: Helm package for creation of the Weblogic operator.
6+
digest: de086ca50a523ec94afc216b0b45ca7d431c6c9c454ea5d26c1ccd76220a5e7f
7+
name: weblogic-operator
8+
urls:
9+
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.1.tgz
10+
version: "2.1"
11+
generated: 2019-02-06T10:58:20.173792276-08:00
8.42 KB
Binary file not shown.

kubernetes/charts/weblogic-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33

44
name: weblogic-operator
5-
version: 2.0
6-
description: Helm chart for configuring the WebLogic operator.
5+
version: 2.1
6+
description: Helm chart for configuring the WebLogic operator.

kubernetes/charts/weblogic-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ domainNamespaces:
2020
- "default"
2121

2222
# image specifies the docker image containing the operator code.
23-
image: "oracle/weblogic-kubernetes-operator:2.0"
23+
image: "oracle/weblogic-kubernetes-operator:2.1"
2424

2525
# imagePullPolicy specifies the image pull policy for the operator docker image.
2626
imagePullPolicy: "IfNotPresent"

kubernetes/package-helm-charts.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
# Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
3+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
4+
5+
SCRIPTPATH="$( cd "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )"
6+
WOCHARTPATH="$SCRIPTPATH/charts/weblogic-operator"
7+
8+
if uname | grep -q "Darwin"; then
9+
mod_time_fmt="-f %m"
10+
else
11+
mod_time_fmt="-c %Y"
12+
fi
13+
14+
# Find latest file in source directory
15+
unset -v latest
16+
for file in "$WOCHARTPATH"/*; do
17+
[[ $file -nt $latest ]] && latest=$file
18+
done
19+
20+
srctime="$(stat $mod_time_fmt $latest)"
21+
22+
out="$(helm package $WOCHARTPATH -d $SCRIPTPATH)"
23+
helm_package=$(echo $out | cut -d ':' -f 2)
24+
helm_package_name=$(basename $helm_package)
25+
26+
dsttime=0
27+
if [ -f $SCRIPTPATH/../docs/charts/$helm_package_name ]; then
28+
dsttime="$(stat $mod_time_fmt $SCRIPTPATH/../docs/charts/$helm_package_name)"
29+
fi
30+
31+
if [ $srctime \> $dsttime ];
32+
then
33+
mkdir $SCRIPTPATH/../docs/charts
34+
helm repo index $WOCHARTPATH/ --url https://oracle.github.io/weblogic-kubernetes-operator/charts --merge $SCRIPTPATH/../docs/charts/index.yaml
35+
36+
mv -f $helm_package $SCRIPTPATH/../docs/charts/
37+
rm $WOCHARTPATH/index.yaml
38+
else
39+
rm $helm_package
40+
fi;
41+
42+

kubernetes/pom.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,23 @@
4141
</execution>
4242
</executions>
4343
</plugin>
44-
44+
<plugin>
45+
<groupId>org.codehaus.mojo</groupId>
46+
<artifactId>exec-maven-plugin</artifactId>
47+
<version>1.6.0</version>
48+
<executions>
49+
<execution><!-- helm chart package-->
50+
<id>package-helm-charts</id>
51+
<phase>compile</phase>
52+
<goals>
53+
<goal>exec</goal>
54+
</goals>
55+
<configuration>
56+
<executable>${project.basedir}/package-helm-charts.sh</executable>
57+
</configuration>
58+
</execution>
59+
</executions>
60+
</plugin>
4561
</plugins>
4662
</build>
4763

0 commit comments

Comments
 (0)