[390506] support update strategy
- Update Makefile to more closely resemble UCP standards - Add tools for downloading helm-toolkit - Support update strategy Change-Id: I21d50ade416552eeb6be9bbebbfc1effd1ae7f15
This commit is contained in:
parent
9e7028416e
commit
651cb8f816
12
Makefile
12
Makefile
|
@ -26,13 +26,15 @@ $(CHARTS):
|
|||
@echo "===== Processing [$@] chart ====="
|
||||
@make $(TASK)-$@
|
||||
|
||||
init-%:
|
||||
if [ -f $*/Makefile ]; then make -C $*; fi
|
||||
if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
|
||||
init-%: clean
|
||||
DEP_UP_LIST=$* tools/helm_tk.sh $(HELM)
|
||||
|
||||
lint-%: init-%
|
||||
if [ -d $* ]; then $(HELM) lint $*; fi
|
||||
|
||||
dryrun-%: init-%
|
||||
$(HELM) template $*
|
||||
|
||||
build-%: lint-%
|
||||
if [ -d $* ]; then $(HELM) package $*; fi
|
||||
|
||||
|
@ -45,6 +47,4 @@ clean:
|
|||
.PHONY: $(EXCLUDES) $(CHARTS)
|
||||
|
||||
.PHONY: charts
|
||||
charts: clean
|
||||
$(HELM) dep up $(CHART)
|
||||
$(HELM) package $(CHART)
|
||||
charts: clean build-$(CHART)
|
||||
|
|
|
@ -25,6 +25,7 @@ kind: DaemonSet
|
|||
metadata:
|
||||
name: {{ $daemonset }}
|
||||
spec:
|
||||
{{ tuple $envAll $daemonset | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
|
|
@ -25,6 +25,7 @@ kind: DaemonSet
|
|||
metadata:
|
||||
name: {{ $daemonset }}
|
||||
spec:
|
||||
{{ tuple $envAll $daemonset | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
|
|
@ -25,6 +25,7 @@ kind: DaemonSet
|
|||
metadata:
|
||||
name: {{ $daemonset }}
|
||||
spec:
|
||||
{{ tuple $envAll $daemonset | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
|
|
@ -25,6 +25,7 @@ kind: DaemonSet
|
|||
metadata:
|
||||
name: {{ $daemonset }}
|
||||
spec:
|
||||
{{ tuple $envAll $daemonset | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
|
|
@ -24,3 +24,25 @@ images:
|
|||
conf:
|
||||
chroot_mnt_path: '/mnt'
|
||||
log_colors: False
|
||||
|
||||
pod:
|
||||
lifecycle:
|
||||
upgrades:
|
||||
daemonsets:
|
||||
pod_replacement_strategy: RollingUpdate
|
||||
ethtool:
|
||||
enabled: true
|
||||
min_ready_seconds: 0
|
||||
max_unavailable: 100%
|
||||
mounts:
|
||||
enabled: true
|
||||
min_ready_seconds: 0
|
||||
max_unavailable: 100%
|
||||
uamlite:
|
||||
enabled: true
|
||||
min_ready_seconds: 0
|
||||
max_unavailable: 100%
|
||||
sysctl:
|
||||
enabled: true
|
||||
min_ready_seconds: 0
|
||||
max_unavailable: 100%
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Script to setup helm-toolkit and helm dep up the shipyard chart
|
||||
#
|
||||
HELM=$1
|
||||
HTK_REPO=${HTK_REPO:-"https://github.com/openstack/openstack-helm"}
|
||||
HTK_PATH=${HTK_PATH:-""}
|
||||
DEP_UP_LIST=${DEP_UP_LIST:-"divingbell"}
|
||||
|
||||
if [[ ! -z $(echo $http_proxy) ]]
|
||||
then
|
||||
export no_proxy=$no_proxy,127.0.0.1
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
function helm_serve {
|
||||
if [[ -d "$HOME/.helm" ]]; then
|
||||
echo ".helm directory found"
|
||||
else
|
||||
${HELM} init --client-only
|
||||
fi
|
||||
if [[ -z $(curl -s 127.0.0.1:8879 | grep 'Helm Repository') ]]; then
|
||||
${HELM} serve & > /dev/null
|
||||
while [[ -z $(curl -s 127.0.0.1:8879 | grep 'Helm Repository') ]]; do
|
||||
sleep 1
|
||||
echo "Waiting for Helm Repository"
|
||||
done
|
||||
else
|
||||
echo "Helm serve already running"
|
||||
fi
|
||||
|
||||
if ${HELM} repo list | grep -q "^stable" ; then
|
||||
${HELM} repo remove stable
|
||||
fi
|
||||
|
||||
${HELM} repo add local http://localhost:8879/charts
|
||||
}
|
||||
|
||||
mkdir -p build
|
||||
pushd build
|
||||
git clone --depth 1 $HTK_REPO || true
|
||||
pushd openstack-helm/$HTK_PATH
|
||||
|
||||
git pull
|
||||
helm_serve
|
||||
make helm-toolkit
|
||||
popd && popd
|
||||
for c in $DEP_UP_LIST
|
||||
do
|
||||
${HELM} dep up $c
|
||||
done
|
Loading…
Reference in New Issue