#!/bin/sh

. /etc/sysconfig/heat-params

KUBE_OS_CLOUD_CONFIG=/etc/sysconfig/kube_openstack_config

# kubernetes backend only support keystone v2 at this point
AUTH_URL=${AUTH_URL/v3/v2}

# Generate a the configuration for Kubernetes services
# to talk to OpenStack Neutron
cat > $KUBE_OS_CLOUD_CONFIG <<EOF
[Global]
auth-url=$AUTH_URL
Username=$USERNAME
Password=$PASSWORD
tenant-name=$TENANT_NAME
[LoadBalancer]
subnet-id=$CLUSTER_SUBNET
create-monitor=yes
monitor-delay=1m
monitor-timeout=30s
monitor-max-retries=3
EOF

#!/bin/sh

. /etc/sysconfig/heat-params

KUBE_OS_CLOUD_CONFIG=/etc/sysconfig/kube_openstack_config

# kubernetes backend only support keystone v2 at this point
AUTH_URL=$(echo "$AUTH_URL" | tr -s "v3" "v2")

# Generate a the configuration for Kubernetes services
# to talk to OpenStack Neutron
cat > $KUBE_OS_CLOUD_CONFIG <<EOF
[Global]
auth-url=$AUTH_URL
Username=$USERNAME
Password=$PASSWORD
tenant-name=$TENANT_NAME
[LoadBalancer]
subnet-id=$CLUSTER_SUBNET
create-monitor=yes
monitor-delay=1m
monitor-timeout=30s
monitor-max-retries=3
EOF

Fix bashisms in k8s os config template fragment.
Fix bashisms in k8s os config template fragment.

Partial fix for problems output by checkbashisms for file
magnum/templates/kubernetes/fragments/write-kube-os-config.sh only.

Change-Id: I68b021da63b6c2d058053023a4fa26d643f0134b
Partial-Bug: #1561232
