Skip to content

Commit 1cd37cf

Browse files
sgalsalehemosbaugh
andauthored
Update admin console to 1.124.9 to support changing custom domains (#2018)
* updated adminconsole version --------- Co-authored-by: emosbaugh <[email protected]>
1 parent 49d3d5b commit 1cd37cf

File tree

7 files changed

+50
-20
lines changed

7 files changed

+50
-20
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ jobs:
170170
go-version-file: go.mod
171171
cache-dependency-path: "**/*.sum"
172172

173+
- uses: oras-project/setup-oras@v1
174+
173175
- name: Install dagger
174176
run: |
175177
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
@@ -240,6 +242,8 @@ jobs:
240242
go-version-file: go.mod
241243
cache-dependency-path: "**/*.sum"
242244

245+
- uses: oras-project/setup-oras@v1
246+
243247
- name: Install dagger
244248
run: |
245249
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
@@ -345,6 +349,8 @@ jobs:
345349
go-version-file: go.mod
346350
cache-dependency-path: "**/*.sum"
347351

352+
- uses: oras-project/setup-oras@v1
353+
348354
- name: Install dagger
349355
run: |
350356
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh

.github/workflows/release-prod.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ jobs:
148148
go-version-file: go.mod
149149
cache-dependency-path: "**/*.sum"
150150

151+
- uses: oras-project/setup-oras@v1
152+
151153
- name: Download buildtools artifact
152154
uses: actions/download-artifact@v4
153155
with:

Makefile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@ K0S_BINARY_SOURCE_OVERRIDE =
1818
TROUBLESHOOT_VERSION = v0.117.0
1919

2020
KOTS_VERSION = v$(shell awk '/^version/{print $$2}' pkg/addons/adminconsole/static/metadata.yaml | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
21-
# When updating KOTS_BINARY_URL_OVERRIDE, also update the KOTS_VERSION above or
22-
# scripts/ci-upload-binaries.sh may find the version in the cache and not upload the overridden binary.
21+
# If KOTS_BINARY_URL_OVERRIDE is set to a ttl.sh artifact, there's NO need to update the KOTS_VERSION above as it will be dynamically generated
2322
KOTS_BINARY_URL_OVERRIDE =
23+
# If KOTS_BINARY_FILE_OVERRIDE is set, there's NO need to update the KOTS_VERSION above as it will be dynamically generated
2424
# For dev env, build the kots binary in the kots repo with "make kots-linux-arm64" and set this to "../kots/bin/kots"
2525
KOTS_BINARY_FILE_OVERRIDE =
26+
27+
ifeq ($(findstring ttl.sh,$(KOTS_BINARY_URL_OVERRIDE)),ttl.sh)
28+
KOTS_VERSION = kots-dev-$(shell oras manifest fetch $(KOTS_BINARY_URL_OVERRIDE) | jq '.layers[0].digest' | cut -c9-15)
29+
else ifdef KOTS_BINARY_FILE_OVERRIDE
30+
KOTS_VERSION = kots-dev-$(shell shasum -a 256 $(KOTS_BINARY_FILE_OVERRIDE) | cut -c1-8)
31+
endif
32+
2633
# TODO: move this to a manifest file
2734
LOCAL_ARTIFACT_MIRROR_IMAGE ?= proxy.replicated.com/anonymous/replicated/embedded-cluster-local-artifact-mirror:$(VERSION)
2835
# These are used to override the binary urls in dev and e2e tests
@@ -38,10 +45,6 @@ else ifeq ($(K0S_VERSION),v1.28.14+k0s.0-ec.0)
3845
K0S_BINARY_SOURCE_OVERRIDE = https://tf-staging-embedded-cluster-bin.s3.amazonaws.com/custom-k0s-binaries/k0s-v1.28.14%2Bk0s.0-ec.0-$(ARCH)
3946
endif
4047

41-
ifneq ($(KOTS_BINARY_FILE_OVERRIDE),)
42-
KOTS_VERSION = kots-dev-$(shell shasum -a 256 $(KOTS_BINARY_FILE_OVERRIDE) | cut -c1-8)
43-
endif
44-
4548
LD_FLAGS = \
4649
-X github.com/replicatedhq/embedded-cluster/pkg/versions.K0sVersion=$(K0S_VERSION) \
4750
-X github.com/replicatedhq/embedded-cluster/pkg/versions.Version=$(VERSION) \
@@ -173,7 +176,11 @@ output/bins/kubectl-kots-%:
173176
output/bins/kubectl-kots-override:
174177
mkdir -p output/bins
175178
mkdir -p output/tmp
176-
curl --retry 5 --retry-all-errors -fL -o output/tmp/kots.tar.gz "$(KOTS_BINARY_URL_OVERRIDE)"
179+
if [[ "$(KOTS_BINARY_URL_OVERRIDE)" == ttl.sh* ]]; then \
180+
oras pull "$(KOTS_BINARY_URL_OVERRIDE)" --output output/tmp ; \
181+
else \
182+
curl --retry 5 --retry-all-errors -fL -o output/tmp/kots.tar.gz "$(KOTS_BINARY_URL_OVERRIDE)" ; \
183+
fi
177184
tar -xzf output/tmp/kots.tar.gz -C output/tmp
178185
mv output/tmp/kots $@
179186
touch $@

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Additionally, it includes a Registry when deployed in air gap mode, and SeaweedF
2323
- Dagger
2424
- shasum
2525
- jq
26+
- oras
2627
- Kubectl (for integration tests)
2728
- Kind (for integration tests)
2829

e2e/kots-release-install-stable/nginx-app-helm-v1beta2.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ spec:
1010
values:
1111
server:
1212
image:
13-
repository: repl{{ HasLocalRegistry | ternary LocalRegistryHost "ec-e2e-proxy.testcluster.net" }}/repl{{ HasLocalRegistry | ternary LocalRegistryNamespace "proxy/embedded-cluster-smoke-test-staging-app/us-east4-docker.pkg.dev/replicated-qa/ec-smoke-test" }}/nginx
13+
# TODO: revert repo to "ec-e2e-proxy.testcluster.net" once EC 2.2.0 is released
14+
# as custom domains have been disabled on the channel and enabled in the EC config
15+
# but domains in the EC config are only supported in EC 2.2.0 and above
16+
repository: repl{{ HasLocalRegistry | ternary LocalRegistryHost "proxy.staging.replicated.com" }}/repl{{ HasLocalRegistry | ternary LocalRegistryNamespace "proxy/embedded-cluster-smoke-test-staging-app/us-east4-docker.pkg.dev/replicated-qa/ec-smoke-test" }}/nginx
1417
service:
1518
type: ClusterIP
1619
port: 80
@@ -20,15 +23,21 @@ spec:
2023
client:
2124
enabled: true
2225
image:
23-
repository: repl{{ HasLocalRegistry | ternary LocalRegistryHost "ec-e2e-proxy.testcluster.net" }}/repl{{ HasLocalRegistry | ternary LocalRegistryNamespace "proxy/embedded-cluster-smoke-test-staging-app/us-east4-docker.pkg.dev/replicated-qa/ec-smoke-test" }}/curl
26+
# TODO: revert repo to "ec-e2e-proxy.testcluster.net" once EC 2.2.0 is released
27+
# as custom domains have been disabled on the channel and enabled in the EC config
28+
# but domains in the EC config are only supported in EC 2.2.0 and above
29+
repository: repl{{ HasLocalRegistry | ternary LocalRegistryHost "proxy.staging.replicated.com" }}/repl{{ HasLocalRegistry | ternary LocalRegistryNamespace "proxy/embedded-cluster-smoke-test-staging-app/us-east4-docker.pkg.dev/replicated-qa/ec-smoke-test" }}/curl
2430
replicaCount: 1
2531
intervalSeconds: 60
2632
imagePullSecrets:
2733
- name: '{{repl ImagePullSecretName }}'
2834
replicated:
2935
enabled: true
3036
image:
31-
registry: repl{{ HasLocalRegistry | ternary LocalRegistryHost "ec-e2e-proxy.testcluster.net" }}
37+
# TODO: revert repo to "ec-e2e-proxy.testcluster.net" once EC 2.2.0 is released
38+
# as custom domains have been disabled on the channel and enabled in the EC config
39+
# but domains in the EC config are only supported in EC 2.2.0 and above
40+
registry: repl{{ HasLocalRegistry | ternary LocalRegistryHost "proxy.staging.replicated.com" }}
3241
repository: repl{{ HasLocalRegistry | ternary LocalRegistryNamespace "proxy/embedded-cluster-smoke-test-staging-app/replicated" }}/replicated-sdk
3342
imagePullSecrets:
3443
- name: '{{repl ImagePullSecretName }}'

pkg/addons/adminconsole/static/metadata.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
# $ make buildtools
66
# $ output/bin/buildtools update addon <addon name>
77
#
8-
version: 1.124.7
8+
version: 1.124.9
99
location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console
1010
images:
1111
kotsadm:
1212
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm
1313
tag:
14-
amd64: v1.124.7-amd64@sha256:e4370d7ad72cdae4b970a186bb72c059c234b24c32981188b1f7bbe8cc3fbd0a
15-
arm64: v1.124.7-arm64@sha256:fb7a46a24dec8cc5426e80a97f6f94ec883ac74a907441c4a5909ea3a28dfe15
14+
amd64: v1.124.9-amd64@sha256:de29d4006e545bec78f1109f1d285bb8f7a67a0b88c6ef3620bbc130a278be0b
15+
arm64: v1.124.9-arm64@sha256:e8558f7a87d241fa54439265d8832b2e48083c2bebf2f1c1044d85a0569e53ca
1616
kotsadm-migrations:
1717
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations
1818
tag:
19-
amd64: v1.124.7-amd64@sha256:b9cfff23e3febc76f9f53b68f8bcc2dea6ffe1073c2f4802790375c8548b3d21
20-
arm64: v1.124.7-arm64@sha256:4083d493bfc3720a5b1946cc0e160a20931f73d0111101042efb95af4f73d561
19+
amd64: v1.124.9-amd64@sha256:6aca1248729c3eb9d019b4003432968f982b7ebc8b27e213cb1d650a451cd03f
20+
arm64: v1.124.9-arm64@sha256:6c970692485803d8eb4b697671c8ed5fad712e8b8c1a81b151331cc23d78fd06
2121
kurl-proxy:
2222
repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy
2323
tag:
24-
amd64: v1.124.7-amd64@sha256:3803e23ab306b4a223ebf3717ed496e0db0cf39acce1e3d6e7b5e45ece7c3d7e
25-
arm64: v1.124.7-arm64@sha256:9c1ead5f4c06876117fa1330df741c9c8f86da4b1ed44d137e07fefd72bcea41
24+
amd64: v1.124.9-amd64@sha256:5c74ec100c2890399392d8a806fc32fb199cc0ac71a5da0992a8a67c5d69d005
25+
arm64: v1.124.9-arm64@sha256:a7394a733f3cb545725bf3c060b57dc7771e5ba0f615a34ef0829e06d5d33838
2626
rqlite:
2727
repo: proxy.replicated.com/anonymous/kotsadm/rqlite
2828
tag:
29-
amd64: 8.36.11-r0-amd64@sha256:a6cd95f6e7c80f35738ffd3f8eeea651c493c8d43553a04f1dd35fcea39887fc
30-
arm64: 8.36.11-r0-arm64@sha256:509862e3feed4f131b20c29a71a6ba0928149ffcc6aea9c41e179d92df231aac
29+
amd64: 8.36.14-r0-amd64@sha256:61ad2fa30ec52eaeb6c5599a325a6ee6e59de45db8b0133716fc6f24101d4c54
30+
arm64: 8.36.14-r0-arm64@sha256:94ac76ae6626b28f0e72d7b8d794939ed14c044321824a37578302e0a21bad30

scripts/ci-upload-binaries.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ function kotsbin() {
114114

115115
if [ -n "${kots_url_override}" ]; then
116116
echo "KOTS_BINARY_URL_OVERRIDE is set to '${kots_url_override}', using that source"
117-
curl --retry 5 --retry-all-errors -fL -o "build/kots_linux_${ARCH}.tar.gz" "${kots_url_override}"
117+
if [[ "${kots_url_override}" == ttl.sh/* ]]; then
118+
oras pull "${kots_url_override}" --output "build"
119+
mv build/kots.tar.gz "build/kots_linux_${ARCH}.tar.gz"
120+
else
121+
curl --retry 5 --retry-all-errors -fL -o "build/kots_linux_${ARCH}.tar.gz" "${kots_url_override}"
122+
fi
118123
elif [ -n "${kots_file_override}" ]; then
119124
echo "KOTS_BINARY_FILE_OVERRIDE is set to '${kots_file_override}', using that source"
120125
tar -czvf "build/kots_linux_${ARCH}.tar.gz" -C $(dirname "${kots_file_override}") $(basename "${kots_file_override}")

0 commit comments

Comments
 (0)