diff --git a/README.md b/README.md index 495cb5f742d..636c36d1f33 100644 --- a/README.md +++ b/README.md @@ -145,3 +145,31 @@ Only pull requests from committers that can be verified as having signed the OCA ## Introducing a new dependency 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. + +## Use Helm Chart from Github chart repository + +Add this repo to Helm installation: + +``` +$ helm repo add weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/charts +``` + +Verify repository was added correctly: + +```` +$ helm repo list +NAME URL +weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/charts +``` + +Update with latest information about charts from chart repositories: + +``` +$ helm repo update +``` + +Install Operator from the repo: + +``` +$ helm install helm install weblogic-operator/weblogic-operator --name weblogic-operator +``` diff --git a/docs/charts/index.yaml b/docs/charts/index.yaml new file mode 100644 index 00000000000..eda08ffd0b5 --- /dev/null +++ b/docs/charts/index.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +entries: + weblogic-operator: + - created: 2019-02-06T10:58:20.175515059-08:00 + description: Helm package for creation of the Weblogic operator. + digest: de086ca50a523ec94afc216b0b45ca7d431c6c9c454ea5d26c1ccd76220a5e7f + name: weblogic-operator + urls: + - https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.1.tgz + version: "2.1" +generated: 2019-02-06T10:58:20.173792276-08:00 diff --git a/docs/charts/weblogic-operator-2.1.tgz b/docs/charts/weblogic-operator-2.1.tgz new file mode 100644 index 00000000000..f1d400f627f Binary files /dev/null and b/docs/charts/weblogic-operator-2.1.tgz differ diff --git a/kubernetes/charts/weblogic-operator/Chart.yaml b/kubernetes/charts/weblogic-operator/Chart.yaml index b7418271f95..a520fc1a3dd 100644 --- a/kubernetes/charts/weblogic-operator/Chart.yaml +++ b/kubernetes/charts/weblogic-operator/Chart.yaml @@ -2,5 +2,5 @@ # Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. name: weblogic-operator -version: 2.0 -description: Helm chart for configuring the WebLogic operator. +version: 2.1 +description: Helm chart for configuring the WebLogic operator. \ No newline at end of file diff --git a/kubernetes/charts/weblogic-operator/values.yaml b/kubernetes/charts/weblogic-operator/values.yaml index 98bac6f7558..f840484249a 100644 --- a/kubernetes/charts/weblogic-operator/values.yaml +++ b/kubernetes/charts/weblogic-operator/values.yaml @@ -20,7 +20,7 @@ domainNamespaces: - "default" # image specifies the docker image containing the operator code. -image: "oracle/weblogic-kubernetes-operator:2.0" +image: "oracle/weblogic-kubernetes-operator:2.1" # imagePullPolicy specifies the image pull policy for the operator docker image. imagePullPolicy: "IfNotPresent" diff --git a/kubernetes/package-helm-charts.sh b/kubernetes/package-helm-charts.sh new file mode 100755 index 00000000000..63b254d72e0 --- /dev/null +++ b/kubernetes/package-helm-charts.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved. +# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. + +SCRIPTPATH="$( cd "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )" +WOCHARTPATH="$SCRIPTPATH/charts/weblogic-operator" + +if uname | grep -q "Darwin"; then + mod_time_fmt="-f %m" +else + mod_time_fmt="-c %Y" +fi + +# Find latest file in source directory +unset -v latest +for file in "$WOCHARTPATH"/*; do + [[ $file -nt $latest ]] && latest=$file +done + +srctime="$(stat $mod_time_fmt $latest)" + +out="$(helm package $WOCHARTPATH -d $SCRIPTPATH)" +helm_package=$(echo $out | cut -d ':' -f 2) +helm_package_name=$(basename $helm_package) + +dsttime=0 +if [ -f $SCRIPTPATH/../docs/charts/$helm_package_name ]; then + dsttime="$(stat $mod_time_fmt $SCRIPTPATH/../docs/charts/$helm_package_name)" +fi + +if [ $srctime \> $dsttime ]; +then + mkdir $SCRIPTPATH/../docs/charts + helm repo index $WOCHARTPATH/ --url https://oracle.github.io/weblogic-kubernetes-operator/charts --merge $SCRIPTPATH/../docs/charts/index.yaml + + mv -f $helm_package $SCRIPTPATH/../docs/charts/ + rm $WOCHARTPATH/index.yaml +else + rm $helm_package +fi; + + diff --git a/kubernetes/pom.xml b/kubernetes/pom.xml index e23b41a0c78..9db5317e611 100644 --- a/kubernetes/pom.xml +++ b/kubernetes/pom.xml @@ -41,7 +41,23 @@ - + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + package-helm-charts + compile + + exec + + + ${project.basedir}/package-helm-charts.sh + + + +