From f7de348d1d34a750f5935c56f92d3707d18e0db9 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Tue, 25 Apr 2023 21:05:42 -0600 Subject: [PATCH 1/3] Adds new allocate_k8s_token_v2 extension operation Running on each control plane node is now an extension "server" listening only on port 8800, rather than seprate Docker containers for various extensions. The allocate_k8s_token_v2 extension will leverage v2 of the extension server for the allocate_k8s_token operation. v2 returns not just a bootstrap token, but also the CA cert hash as well as the API URL. In order to be able to migrate gradually to the v2 extension server for tokens, this new extension operation is being created. Once the migration to v2 is complete we can look into retiring the _v2 suffix and moving back to an extension operation with no suffix, or possibly leaving the _v2 one and just removing the old "v1" url mapping. --- storage/extensions.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/storage/extensions.go b/storage/extensions.go index e48b227..c1b1c80 100644 --- a/storage/extensions.go +++ b/storage/extensions.go @@ -4,14 +4,14 @@ // 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 +// 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. -////////////////////////////////////////////////////////////////////////////// +// //////////////////////////////////////////////////////////////////////////// package storage import ( @@ -37,9 +37,10 @@ var ( // Extensions is a static map of operation names to extension URLS for testing. // TODO: save/retrieve extension configuration in/from datastore. Extensions = map[string]string{ - "allocate_k8s_token": "http://token-server-platform-cluster.%s.measurementlab.net:8800/v1/allocate_k8s_token", - "bmc_store_password": "http://bmc-store-password-platform-cluster.%s.measurementlab.net:8801/v1/bmc_store_password", - "test_op": "http://soltesz-epoxy-testing-instance-1.c.%s.internal:8001/operation", + "allocate_k8s_token": "http://epoxy-extension-server.%s.measurementlab.net:8800/v1/allocate_k8s_token", + "allocate_k8s_token_v2": "http://epoxy-extension-server.%s.measurementlab.net:8800/v2/allocate_k8s_token", + "bmc_store_password": "http://epoxy-extension-server.%s.measurementlab.net:8800/v1/bmc_store_password", + "test_op": "http://soltesz-epoxy-testing-instance-1.c.%s.internal:8001/operation", } ) From dafd1e6086814b61fdf74193a1c66084eecab313 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Wed, 26 Apr 2023 16:29:25 -0600 Subject: [PATCH 2/3] Remove allocate_k8s_token_v2 extension Adding a new extension is somewhat painful. The easiest thing to do will be to simply coordinate the release of stage3 images which contain the updated setup_k8s.sh, which knows how to parse allocate_k8s_token V2 responses, with the release of these change to ePoxy. --- storage/extensions.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/extensions.go b/storage/extensions.go index c1b1c80..7343614 100644 --- a/storage/extensions.go +++ b/storage/extensions.go @@ -37,8 +37,7 @@ var ( // Extensions is a static map of operation names to extension URLS for testing. // TODO: save/retrieve extension configuration in/from datastore. Extensions = map[string]string{ - "allocate_k8s_token": "http://epoxy-extension-server.%s.measurementlab.net:8800/v1/allocate_k8s_token", - "allocate_k8s_token_v2": "http://epoxy-extension-server.%s.measurementlab.net:8800/v2/allocate_k8s_token", + "allocate_k8s_token": "http://epoxy-extension-server.%s.measurementlab.net:8800/v2/allocate_k8s_token", "bmc_store_password": "http://epoxy-extension-server.%s.measurementlab.net:8800/v1/bmc_store_password", "test_op": "http://soltesz-epoxy-testing-instance-1.c.%s.internal:8001/operation", } From f954e3cfa59547231040f8a4fe6edc7e0065a4d0 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Thu, 27 Apr 2023 11:16:41 -0600 Subject: [PATCH 3/3] Reverts small formatting changes to license declaration --- storage/extensions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/extensions.go b/storage/extensions.go index 7343614..7fb6262 100644 --- a/storage/extensions.go +++ b/storage/extensions.go @@ -4,14 +4,14 @@ // 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 +// 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. -// //////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// package storage import (