Skip to content

Commit

Permalink
Update default KUBECONFIG file
Browse files Browse the repository at this point in the history
Update the location of the KUBECONFIG file from
admin.conf -> ovn.conf

Signed-off-by: astoycos <astoycos@redhat.com>
  • Loading branch information
astoycos committed Mar 1, 2022
1 parent c261990 commit ef2b7f8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion contrib/kind-dual-stack-conversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ SECONDARY_SERVICE_SUBNET=${SECONDARY_SERVICE_SUBNET:-"fd00:10:96::/112"}
SECONDARY_CLUSTER_SUBNET=${SECONDARY_CLUSTER_SUBNET:-"fd00:10:244::/56"}

# NOTE: ovn only
export KUBECONFIG=${HOME}/admin.conf
export KUBECONFIG=${HOME}/ovn.conf

# KIND nodes
NODES=$(kind get nodes --name ${CLUSTER_NAME})
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL.KUBEADM.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ Deploy on the master node `node1`:
~~~
kubeadm init --pod-network-cidr 172.16.0.0/16 --service-cidr 172.17.0.0/16 --apiserver-advertise-address 192.168.123.1
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo cp -i /etc/kubernetes/ovn.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
~~~

Expand Down
6 changes: 3 additions & 3 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ To run the tests locally, run a KIND deployment as described above. The E2E
tests look for the kube config file in a special location, so make a copy:

```
cp ~/admin.conf ~/.kube/kind-config-kind
cp ~/ovn.conf ~/.kube/kind-config-kind
```

To run the desired shard, first make sure that the necessary environment variables are exported (see section above). Then, go to the location of your local copy of the `ovn-kubernetes` repository:
Expand Down Expand Up @@ -255,7 +255,7 @@ For example:
+ NUM_NODES=20
+ export NUM_WORKER_NODES=3
+ NUM_WORKER_NODES=3
+ ginkgo --nodes=20 '--focus=should\sbe\sable\sto\spreserve\sUDP\straffic\swhen\sserver\spod\scycles\sfor\sa\sNodePort\sservice' '--skip=Networking\sIPerf\sIPv[46]|\[Feature:PerformanceDNS\]|Disruptive|DisruptionController|\[sig-apps\]\sCronJob|\[sig-storage\]|\[Feature:Federation\]|should\shave\sipv4\sand\sipv6\sinternal\snode\sip|should\shave\sipv4\sand\sipv6\snode\spodCIDRs|kube-proxy|should\sset\sTCP\sCLOSE_WAIT\stimeout|should\shave\ssession\saffinity\stimeout\swork|named\sport.+\[Feature:NetworkPolicy\]|\[Feature:SCTP\]|service.kubernetes.io/headless|should\sresolve\sconnection\sreset\sissue\s#74839|sig-api-machinery|\[Feature:NoSNAT\]|Services.+(ESIPP|cleanup\sfinalizer)|configMap\snameserver|ClusterDns\s\[Feature:Example\]|should\sset\sdefault\svalue\son\snew\sIngressClass|should\sprevent\sIngress\screation\sif\smore\sthan\s1\sIngressClass\smarked\sas\sdefault|\[Feature:Networking-IPv6\]|\[Feature:.*DualStack.*\]' --flakeAttempts=5 /usr/local/bin/e2e.test -- --kubeconfig=/root/admin.conf --provider=local --dump-logs-on-failure=false --report-dir=/root/ovn-kubernetes/test/_artifacts --disable-log-dump=true --num-nodes=3
+ ginkgo --nodes=20 '--focus=should\sbe\sable\sto\spreserve\sUDP\straffic\swhen\sserver\spod\scycles\sfor\sa\sNodePort\sservice' '--skip=Networking\sIPerf\sIPv[46]|\[Feature:PerformanceDNS\]|Disruptive|DisruptionController|\[sig-apps\]\sCronJob|\[sig-storage\]|\[Feature:Federation\]|should\shave\sipv4\sand\sipv6\sinternal\snode\sip|should\shave\sipv4\sand\sipv6\snode\spodCIDRs|kube-proxy|should\sset\sTCP\sCLOSE_WAIT\stimeout|should\shave\ssession\saffinity\stimeout\swork|named\sport.+\[Feature:NetworkPolicy\]|\[Feature:SCTP\]|service.kubernetes.io/headless|should\sresolve\sconnection\sreset\sissue\s#74839|sig-api-machinery|\[Feature:NoSNAT\]|Services.+(ESIPP|cleanup\sfinalizer)|configMap\snameserver|ClusterDns\s\[Feature:Example\]|should\sset\sdefault\svalue\son\snew\sIngressClass|should\sprevent\sIngress\screation\sif\smore\sthan\s1\sIngressClass\smarked\sas\sdefault|\[Feature:Networking-IPv6\]|\[Feature:.*DualStack.*\]' --flakeAttempts=5 /usr/local/bin/e2e.test -- --kubeconfig=/root/ovn.conf --provider=local --dump-logs-on-failure=false --report-dir=/root/ovn-kubernetes/test/_artifacts --disable-log-dump=true --num-nodes=3
Running Suite: Kubernetes e2e suite
(...)
• [SLOW TEST:28.091 seconds]
Expand Down Expand Up @@ -303,7 +303,7 @@ For example:
./e2e/multicast.go: ginkgo.It("should be able to send multicast UDP traffic between nodes", func() {
# make control-plane WHAT="should be able to send multicast UDP traffic between nodes"
(...)
+ go test -timeout=0 -v . -ginkgo.v -ginkgo.focus 'should\sbe\sable\sto\ssend\smulticast\sUDP\straffic\sbetween\snodes' -ginkgo.flakeAttempts 2 '-ginkgo.skip=recovering from deleting db files while maintain connectivity|Should validate connectivity before and after deleting all the db-pods at once in HA mode|Should be allowed to node local cluster-networked endpoints by nodeport services with externalTrafficPolicy=local|e2e ingress to host-networked pods traffic validation|host to host-networked pods traffic validation' -provider skeleton -kubeconfig /root/admin.conf --num-nodes=2 --report-dir=/root/ovn-kubernetes/test/_artifacts --report-prefix=control-plane_
+ go test -timeout=0 -v . -ginkgo.v -ginkgo.focus 'should\sbe\sable\sto\ssend\smulticast\sUDP\straffic\sbetween\snodes' -ginkgo.flakeAttempts 2 '-ginkgo.skip=recovering from deleting db files while maintain connectivity|Should validate connectivity before and after deleting all the db-pods at once in HA mode|Should be allowed to node local cluster-networked endpoints by nodeport services with externalTrafficPolicy=local|e2e ingress to host-networked pods traffic validation|host to host-networked pods traffic validation' -provider skeleton -kubeconfig /root/ovn.conf --num-nodes=2 --report-dir=/root/ovn-kubernetes/test/_artifacts --report-prefix=control-plane_
I0817 15:26:21.762483 1197731 test_context.go:457] Tolerating taints "node-role.kubernetes.io/master" when considering if nodes are ready
=== RUN TestE2e
I0817 15:26:21.762635 1197731 e2e_suite_test.go:67] Saving reports to /root/ovn-kubernetes/test/_artifacts
Expand Down
12 changes: 6 additions & 6 deletions docs/kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Launch the KIND Deployment.
```
$ pushd contrib
$ export KUBECONFIG=${HOME}/admin.conf
$ export KUBECONFIG=${HOME}/ovn.conf
$ ./kind.sh
$ popd
```
Expand Down Expand Up @@ -152,7 +152,7 @@ To deploy KIND however, you need to start it as root and then copy root's kube c
```
$ pushd contrib
$ sudo ./kind.sh -ep podman
$ sudo cp /root/admin.conf ~/.kube/kind-config
$ sudo cp /root/ovn.conf ~/.kube/kind-config
$ sudo chown $(id -u):$(id -g) ~/.kube/kind-config
$ export KUBECONFIG=~/.kube/kind-config
$ popd
Expand Down Expand Up @@ -309,9 +309,9 @@ $ KIND_IPV4_SUPPORT=false KIND_IPV6_SUPPORT=true ./kind.sh
Once `kind.sh` completes, setup kube config file:

```
$ cp ~/admin.conf ~/.kube/config
$ cp ~/ovn.conf ~/.kube/config
-- OR --
$ KUBECONFIG=~/admin.conf
$ KUBECONFIG=~/ovn.conf
```

Once testing is complete, to tear down the KIND deployment:
Expand Down Expand Up @@ -412,9 +412,9 @@ $ KIND_IPV4_SUPPORT=true KIND_IPV6_SUPPORT=true K8S_VERSION=v1.23.3 ./kind.sh
Once `kind.sh` completes, setup kube config file:

```
$ cp ~/admin.conf ~/.kube/config
$ cp ~/ovn.conf ~/.kube/config
-- OR --
$ KUBECONFIG=~/admin.conf
$ KUBECONFIG=~/ovn.conf
```

Once testing is complete, to tear down the KIND deployment:
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/e2e-cp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

# setting this env prevents ginkgo e2e from trying to run provider setup
export KUBERNETES_CONFORMANCE_TEST=y
export KUBECONFIG=${HOME}/admin.conf
export KUBECONFIG=${HOME}/ovn.conf

# Skip tests which are not IPv6 ready yet (see description of https://github.com/ovn-org/ovn-kubernetes/pull/2276)
# (Note that netflow v5 is IPv4 only)
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ ginkgo --nodes=${NUM_NODES} \
--flakeAttempts=${FLAKE_ATTEMPTS} \
/usr/local/bin/e2e.test \
-- \
--kubeconfig=${HOME}/admin.conf \
--kubeconfig=${HOME}/ovn.conf \
--provider=local \
--dump-logs-on-failure=false \
--report-dir=${E2E_REPORT_DIR} \
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/upgrade-ovn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -ex


export KUBECONFIG=${HOME}/admin.conf
export KUBECONFIG=${HOME}/ovn.conf
export OVN_IMAGE=${OVN_IMAGE:-ovn-daemonset-f:pr}

kubectl_wait_pods() {
Expand Down

0 comments on commit ef2b7f8

Please sign in to comment.