Skip to content

Commit

Permalink
Merge pull request #961 from sttts/sttts-auto-publish
Browse files Browse the repository at this point in the history
workloads: make --auto-publish-apis default to on
  • Loading branch information
ncdc authored May 3, 2022
2 parents 9a804fa + 650ee4f commit a843d56
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion contrib/demo/ingress-script/startKcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fi

"${DEMOS_DIR}"/startKcp.sh \
--push-mode \
--auto-publish-apis=true \
--resources-to-sync "ingresses.networking.k8s.io,deployments.apps,services" &

wait_command "test -f ${KCP_DATA_DIR}/kcp-started"
Expand Down
1 change: 0 additions & 1 deletion contrib/demo/kubecon-script/startKcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ KUBECONFIG=${KCP_DATA_DIR}/.kcp/admin.kubeconfig

"${DEMOS_DIR}"/startKcp.sh \
--push-mode \
--auto-publish-apis=true \
--resources-to-sync deployments.apps &

wait_command "test -f ${KCP_DATA_DIR}/kcp-started"
Expand Down
1 change: 0 additions & 1 deletion contrib/demo/prototype2-script/startKcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ fi

"${DEMOS_DIR}"/startKcp.sh \
--token-auth-file "${DEMO_DIR}"/kcp-tokens \
--auto-publish-apis \
--push-mode \
--discovery-poll-interval 3s \
--profiler-address localhost:6060 \
Expand Down
1 change: 0 additions & 1 deletion contrib/demo/prototype3-script/startKcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ KUBECONFIG=${KCP_DATA_DIR}/.kcp/admin.kubeconfig

"${DEMOS_DIR}"/startKcp.sh \
--token-auth-file "${DEMO_DIR}"/kcp-tokens \
--auto-publish-apis \
--push-mode \
--discovery-poll-interval 3s \
--profiler-address localhost:6060 \
Expand Down
4 changes: 2 additions & 2 deletions contrib/demo/sharding/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ done
echo

echo "Starting Cluster Controller on kcp1..."
"${KCP_ROOT}"/bin/cluster-controller -push-mode=true -pull-mode=false -kubeconfig=".kcp1/admin.kubeconfig" -auto-publish-apis=true .configmaps &> .kcp1.cluster-controller.log 2>&1 &
"${KCP_ROOT}"/bin/cluster-controller -push-mode=true -pull-mode=false -kubeconfig=".kcp1/admin.kubeconfig" .configmaps &> .kcp1.cluster-controller.log 2>&1 &

echo "Starting kcp2..."
"${KCP_ROOT}"/bin/kcp start --enable-sharding --shard-kubeconfig-file ".kcp1/data/shard.kubeconfig" --root-directory ".kcp2" --etcd-client-port 2381 --etcd-peer-port 2382 --secure-port :6444 > ".kcp2.log" 2>&1 &
Expand All @@ -81,7 +81,7 @@ done
echo

echo "Starting Cluster Controller on kcp2..."
"${KCP_ROOT}"/bin/cluster-controller -push-mode=true -pull-mode=false -kubeconfig=".kcp1/admin.kubeconfig" -auto-publish-apis=true .configmaps &> .kcp1.cluster-controller.log 2>&1 &
"${KCP_ROOT}"/bin/cluster-controller -push-mode=true -pull-mode=false -kubeconfig=".kcp1/admin.kubeconfig" .configmaps &> .kcp1.cluster-controller.log 2>&1 &

"${KCP_ROOT}"/contrib/demo/sharding/add-cluster.py ".kcp1/admin.kubeconfig" ".kcp2/admin.kubeconfig"
touch .ready
Expand Down
1 change: 0 additions & 1 deletion contrib/demo/workspaceKubectlPlugin-script/startKcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ setupTraps "$0"
KUBECONFIG=${KCP_DATA_DIR}/.kcp/admin.kubeconfig
"${DEMOS_DIR}"/startKcp.sh \
--push-mode \
--auto-publish-apis=true \
--resources-to-sync deployments.apps \
--token-auth-file "${DEMO_DIR}"/kcp-tokens

Expand Down
1 change: 0 additions & 1 deletion manifest/kcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ spec:
- /kcp
args:
- start
- --auto-publish-apis
- --etcd-servers=https://etcd:2379
- --etcd-keyfile=/etc/etcd/tls/server/tls.key
- --etcd-certfile=/etc/etcd/tls/server/tls.crt
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/apis/apiresource/startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
// DefaultOptions are the default options for the apiresource controller.
func DefaultOptions() *Options {
return &Options{
AutoPublishAPIs: false,
AutoPublishAPIs: true,
// Consumed by server instantiation
NumThreads: runtime.NumCPU(),
}
Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func TestServerArgs() []string {
// start a test server with the given token auth file.
func TestServerArgsWithTokenAuthFile(tokenAuthFile string) []string {
return []string{
"--auto-publish-apis",
"--discovery-poll-interval=5s",
"--token-auth-file", tokenAuthFile,
"--run-virtual-workspaces=true",
Expand Down

0 comments on commit a843d56

Please sign in to comment.