mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
parent
5ba3a551f9
commit
5b22dd7631
28
cluster/vsphere/templates/create-dynamic-salt-files.sh
Executable file
28
cluster/vsphere/templates/create-dynamic-salt-files.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014 Google Inc. All 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.
|
||||||
|
|
||||||
|
# Create the overlay files for the salt tree. We create these in a separate
|
||||||
|
# place so that we can blow away the rest of the salt configs on a kube-push and
|
||||||
|
# re-apply these.
|
||||||
|
|
||||||
|
mkdir -p /srv/salt-overlay/pillar
|
||||||
|
cat <<EOF >/srv/salt-overlay/pillar/cluster-params.sls
|
||||||
|
node_instance_prefix: $NODE_INSTANCE_PREFIX
|
||||||
|
portal_net: $PORTAL_NET
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p /srv/salt-overlay/salt/nginx
|
||||||
|
echo $MASTER_HTPASSWD > /srv/salt-overlay/salt/nginx/htpasswd
|
@ -28,11 +28,6 @@ grains:
|
|||||||
cloud: vsphere
|
cloud: vsphere
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/srv/pillar/cluster-params.sls
|
|
||||||
node_instance_prefix: $NODE_INSTANCE_PREFIX
|
|
||||||
portal_net: $PORTAL_NET
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Auto accept all keys from minions that try to join
|
# Auto accept all keys from minions that try to join
|
||||||
mkdir -p /etc/salt/master.d
|
mkdir -p /etc/salt/master.d
|
||||||
cat <<EOF >/etc/salt/master.d/auto-accept.conf
|
cat <<EOF >/etc/salt/master.d/auto-accept.conf
|
||||||
@ -48,9 +43,6 @@ reactor:
|
|||||||
- /srv/reactor/highstate-minions.sls
|
- /srv/reactor/highstate-minions.sls
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p /srv/salt/nginx
|
|
||||||
echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd
|
|
||||||
|
|
||||||
# Install Salt
|
# Install Salt
|
||||||
#
|
#
|
||||||
# We specify -X to avoid a race condition that can cause minion failure to
|
# We specify -X to avoid a race condition that can cause minion failure to
|
||||||
|
@ -294,6 +294,7 @@ function kube-up {
|
|||||||
echo "readonly SERVER_BINARY_TAR='${SERVER_BINARY_TAR##*/}'"
|
echo "readonly SERVER_BINARY_TAR='${SERVER_BINARY_TAR##*/}'"
|
||||||
echo "readonly SALT_TAR='${SALT_TAR##*/}'"
|
echo "readonly SALT_TAR='${SALT_TAR##*/}'"
|
||||||
echo "readonly MASTER_HTPASSWD='${htpasswd}'"
|
echo "readonly MASTER_HTPASSWD='${htpasswd}'"
|
||||||
|
grep -v "^#" "${KUBE_ROOT}/cluster/vsphere/templates/create-dynamic-salt-files.sh"
|
||||||
grep -v "^#" "${KUBE_ROOT}/cluster/vsphere/templates/install-release.sh"
|
grep -v "^#" "${KUBE_ROOT}/cluster/vsphere/templates/install-release.sh"
|
||||||
grep -v "^#" "${KUBE_ROOT}/cluster/vsphere/templates/salt-master.sh"
|
grep -v "^#" "${KUBE_ROOT}/cluster/vsphere/templates/salt-master.sh"
|
||||||
) > "${KUBE_TEMP}/master-start.sh"
|
) > "${KUBE_TEMP}/master-start.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user