Skip to content

Commit

Permalink
KIND deployments for CNO fails.
Browse files Browse the repository at this point in the history
KIND deployments for CNO are failing due to a requirement for existence of
"cluster-config-v1" configMap introduced by merge c594414 on 03/09/2020. This
change adds a minimal "cluster-config-v1" configMap to KIND deployments.

Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
  • Loading branch information
Billy99 committed Mar 19, 2020
1 parent 2426026 commit 269faf7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions hack/ovn-kind-cno.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ CNO_PATH=${CNO_PATH:-$GOPATH/src/github.com/openshift/cluster-network-operator}
OVN_K8S_PATH=${OVN_K8S_PATH:-$GOPATH/src/github.com/ovn-org/ovn-kubernetes}
CLUSTER_CIDR=${CLUSTER_CIDR:-"172.16.0.0/16"}
SERVICE_NETWORK=${SERVICE_NETWORK:-"172.30.0.0/16"}
# Skip the comment lines and retrieve the number of Master nodes from kind.yaml file.
NUM_MASTER_NODES=`grep "^[^#]" kind.yaml | grep -c "role\: control-plane"`

# Check for docker
if ! command -v docker; then
Expand Down Expand Up @@ -166,6 +168,20 @@ if [ "$BUILD_CNO" != true ]; then
kubectl cp /tmp/ovnkube-node.yaml openshift-network-operator/${CNO_POD}:/bindata/network/ovn-kubernetes/
fi

echo "Creating \"cluster-config-v1\" configMap with $NUM_MASTER_NODES master nodes"
cat <<EOF | kubectl create -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-config-v1
namespace: kube-system
data:
install-config: |
apiVersion: v1
controlPlane:
replicas: ${NUM_MASTER_NODES}
EOF

echo "Creating OVN CNO config"
cat << EOF | kubectl create -f -
apiVersion: config.openshift.io/v1
Expand Down

0 comments on commit 269faf7

Please sign in to comment.