Skip to content

Commit

Permalink
Merge branch 'release/2.7.1-alpha.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Jun 5, 2024
2 parents 7f0b339 + c651d30 commit 7040630
Show file tree
Hide file tree
Showing 14 changed files with 142 additions and 130 deletions.
12 changes: 6 additions & 6 deletions carvel-packages/training-platform/bundle/config/00-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ imageVersions:
image: "debian:sid-20230502-slim"
- name: docker-in-docker
image: "docker:20.10.18-dind"
- name: rancher-k3s-v1.25
image: "rancher/k3s:v1.25.16-k3s4"
- name: rancher-k3s-v1.26
image: "rancher/k3s:v1.26.12-k3s1"
- name: rancher-k3s-v1.27
image: "rancher/k3s:v1.27.9-k3s1"
image: "rancher/k3s:v1.27.14-k3s1"
- name: rancher-k3s-v1.28
image: "rancher/k3s:v1.28.5-k3s1"
image: "rancher/k3s:v1.28.10-k3s1"
- name: rancher-k3s-v1.29
image: "rancher/k3s:v1.29.5-k3s1"
- name: rancher-k3s-v1.30
image: "rancher/k3s:v1.30.1-k3s1"
- name: loftsh-vcluster
image: "loftsh/vcluster:0.18.1"
- name: contour-bundle
Expand Down
12 changes: 6 additions & 6 deletions carvel-packages/training-platform/config/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ imageVersions:
image: "debian:sid-20230502-slim"
- name: docker-in-docker
image: "docker:20.10.18-dind"
- name: rancher-k3s-v1.25
image: "rancher/k3s:v1.25.16-k3s4"
- name: rancher-k3s-v1.26
image: "rancher/k3s:v1.26.12-k3s1"
- name: rancher-k3s-v1.27
image: "rancher/k3s:v1.27.9-k3s1"
image: "rancher/k3s:v1.27.14-k3s1"
- name: rancher-k3s-v1.28
image: "rancher/k3s:v1.28.5-k3s1"
image: "rancher/k3s:v1.28.10-k3s1"
- name: rancher-k3s-v1.29
image: "rancher/k3s:v1.29.5-k3s1"
- name: rancher-k3s-v1.30
image: "rancher/k3s:v1.30.1-k3s1"
- name: loftsh-vcluster
image: "loftsh/vcluster:0.18.1"
- name: contour-bundle
Expand Down
25 changes: 25 additions & 0 deletions project-docs/release-notes/version-2.7.1.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
Version 2.7.1
=============

New Features
------------

* It is now possible to override the cooldown period during which a clickable
action cannot be clicked a second time. For many clickable actions this
defaults to 3 seconds. For a specific use of a clickable action this can be
overridden by setting the `cooldown` property to the number of seconds. To
totally disable clicking on the action a second time you can use the special
`.INF` value. Reloading a page will though again allow the clickable action to
be used again. For more information see [Overriding action cooldown
period](overriding-action-cooldown-period).

Features Changed
----------------

* Updated VS Code to version 1.89.1.

* Versions of kubectl now provided are 1.27-1.30.

* Reduction of noise in logging for session manager, secrets manager and
training portal, with additional more specific logging on what each is doing.

Expand Down Expand Up @@ -97,3 +111,14 @@ Bugs Fixed
not being set as being owned by the workshop namespace. This meant these
resources were not being deleted automatically when the workshop environment
and workshop namespace were deleted.

* Clicking on links in the dashboard terminal would result in a blank browser
window rather than opening the target URL. This had broken when xterm.js had
been updated as the implementation used by xterm.js had changed and it no
longer works when xterm.js is embedded in an iframe. The implementation used
by xterm.js when clicking on links to open the window has been overridden to
use the older mechanism.

* DNS resolution was not working from pods deployed to a virtual cluster. Issue
fixed and `vcluster` updated to 0.18.1, with support for Kubernetes versions
1.27-1.30, defaulting to 1.29.
20 changes: 20 additions & 0 deletions project-docs/workshop-content/workshop-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,26 @@ delay: 1
```
~~~

(overriding-action-cooldown-period)=
Overriding action cooldown period
---------------------------------

For the majority of clickable actions a cooldown period is applied of 3 seconds. This means one is blocked from clicking on the same clickable action a second time until the cooldown period has expired. This is intended to avoid problems caused by accidental double clicks.

This cooldown period can be overridden if it is desired to block a user from using the clickable action again for a longer period of time, by setting the `cooldown` property. The value of the period should be in seconds. One can also use the special value `.INF` if wanting to block it from being clicked a second time.

~~~
```examiner:execute-test
name: test-that-pod-exists
title: Verify that pod named "one" exists.
cooldown: .INF
args:
- one
```
~~~

Note that reloading of the web page holding the instructions will reset the cooldown period and the clickable action will be able to be used again.

(hiding-clickable-actions-from-view)=
Hiding clickable actions from view
----------------------------------
Expand Down
25 changes: 9 additions & 16 deletions session-manager/handlers/application_vcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
from .operator_config import (
OPERATOR_API_GROUP,
CLUSTER_STORAGE_GROUP,
RANCHER_K3S_V1_25_IMAGE,
RANCHER_K3S_V1_26_IMAGE,
RANCHER_K3S_V1_27_IMAGE,
RANCHER_K3S_V1_28_IMAGE,
RANCHER_K3S_V1_29_IMAGE,
RANCHER_K3S_V1_30_IMAGE,
LOFTSH_VCLUSTER_IMAGE,
CONTOUR_BUNDLE_IMAGE,
)


K8S_DEFAULT_VERSION = "1.27"
K8S_DEFAULT_VERSION = "1.29"

K3S_VERSIONS = {
"1.25": RANCHER_K3S_V1_25_IMAGE,
"1.26": RANCHER_K3S_V1_26_IMAGE,
"1.27": RANCHER_K3S_V1_27_IMAGE,
"1.28": RANCHER_K3S_V1_28_IMAGE,
"1.29": RANCHER_K3S_V1_29_IMAGE,
"1.30": RANCHER_K3S_V1_30_IMAGE,
}


Expand Down Expand Up @@ -186,21 +186,14 @@ def vcluster_environment_objects_list(workshop_spec, application_properties):
- name: custom-config-volume
mountPath: /etc/coredns/custom
readOnly: true
ports:
- containerPort: 1053
name: dns
protocol: UDP
- containerPort: 1053
name: dns-tcp
protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
securityContext:
runAsNonRoot: true
runAsUser: {{.RUN_AS_USER}}
runAsNonRoot: {{.RUN_AS_NON_ROOT}}
runAsGroup: {{.RUN_AS_GROUP}}
allowPrivilegeEscalation: false
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
readOnlyRootFilesystem: true
Expand Down
4 changes: 2 additions & 2 deletions session-manager/handlers/operator_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ def image_reference(name):
"conda-environment:*": CONDA_ENVIRONMENT_IMAGE,
}

RANCHER_K3S_V1_25_IMAGE = image_reference("rancher-k3s-v1.25")
RANCHER_K3S_V1_26_IMAGE = image_reference("rancher-k3s-v1.26")
RANCHER_K3S_V1_27_IMAGE = image_reference("rancher-k3s-v1.27")
RANCHER_K3S_V1_28_IMAGE = image_reference("rancher-k3s-v1.28")
RANCHER_K3S_V1_29_IMAGE = image_reference("rancher-k3s-v1.29")
RANCHER_K3S_V1_30_IMAGE = image_reference("rancher-k3s-v1.30")

LOFTSH_VCLUSTER_IMAGE = image_reference("loftsh-vcluster")

Expand Down
59 changes: 24 additions & 35 deletions workshop-images/base-environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,57 +148,46 @@ RUN mkdir -p /opt/kubernetes/bin

RUN <<EOF
set -eo pipefail
VERSION=1.24.17
CHECKSUM_amd64="3e9588e3326c7110a163103fc3ea101bb0e85f4d6fd228cf928fa9a2a20594d5"
CHECKSUM_arm64="66885bda3a202546778c77f0b66dcf7f576b5a49ff9456acf61329da784a602d"
VERSION=1.27.14
CHECKSUM_amd64="1d2431c68bb6dfa9de3cd40fd66d97a9ac73593c489f9467249eea43e9c16a1e"
CHECKSUM_arm64="29f3a1f520d929df38873c68dec73519c1e5e521140e01cf9d7701f7b5ffe4f3"
CHECKSUM=CHECKSUM_${TARGETARCH}
curl --silent --fail -L -o /opt/kubernetes/bin/[email protected] https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/[email protected]" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/[email protected]
EOF

RUN <<EOF
set -eo pipefail
VERSION=1.25.16
CHECKSUM_amd64="5a9bc1d3ebfc7f6f812042d5f97b82730f2bdda47634b67bddf36ed23819ab17"
CHECKSUM_arm64="d6c23c80828092f028476743638a091f2f5e8141273d5228bf06c6671ef46924"
CHECKSUM=CHECKSUM_${TARGETARCH}
curl --silent --fail -L -o /opt/kubernetes/bin/[email protected] https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/[email protected]" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/[email protected]
curl --silent --fail -L -o /opt/kubernetes/bin/[email protected] https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/[email protected]" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/[email protected]
EOF

RUN <<EOF
set -eo pipefail
VERSION=1.26.11
CHECKSUM_amd64="27c34a0870230d9dd723e1e01114634e396cd2a3d25ced263b769a4bd53e4edd"
CHECKSUM_arm64="4a6d2b7204af3cf84cd0e2c670fbb211501050c9a288de49de3c6363d4e0a63e"
VERSION=1.28.10
CHECKSUM_amd64="389c17a9700a4b01ebb055e39b8bc0886330497440dde004b5ed90f2a3a028db"
CHECKSUM_arm64="e659d23d442c2706debe5b96742326c0a1e1d7b5c695a9fe7dfe8ea7402caee8"
CHECKSUM=CHECKSUM_${TARGETARCH}
curl --silent --fail -L -o /opt/kubernetes/bin/kubectl@1.26 https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/kubectl@1.26" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/kubectl@1.26
curl --silent --fail -L -o /opt/kubernetes/bin/kubectl@1.28 https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/kubectl@1.28" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/kubectl@1.28
EOF

RUN <<EOF
set -eo pipefail
VERSION=1.27.8
CHECKSUM_amd64="027b3161e99fa0a7fa529e8f17f73ee2c0807c81c721ca7cf307f6b41c17bc57"
CHECKSUM_arm64="97ed6739e2803e63fd2d9de78be22d5ba6205bb63179a16ec773063526525a8e"
VERSION=1.29.5
CHECKSUM_amd64="603c8681fc0d8609c851f9cc58bcf55eeb97e2934896e858d0232aa8d1138366"
CHECKSUM_arm64="9ee9168def12ac6a6c0c6430e0f73175e756ed262db6040f8aa2121ad2c1f62e"
CHECKSUM=CHECKSUM_${TARGETARCH}
curl --silent --fail -L -o /opt/kubernetes/bin/kubectl@1.27 https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/kubectl@1.27" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/kubectl@1.27
curl --silent --fail -L -o /opt/kubernetes/bin/kubectl@1.29 https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/kubectl@1.29" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/kubectl@1.29
EOF

RUN <<EOF
set -eo pipefail
VERSION=1.28.4
CHECKSUM_amd64="893c92053adea6edbbd4e959c871f5c21edce416988f968bec565d115383f7b8"
CHECKSUM_arm64="edf1e17b41891ec15d59dd3cc62bcd2cdce4b0fd9c2ee058b0967b17534457d7"
VERSION=1.30.1
CHECKSUM_amd64="5b86f0b06e1a5ba6f8f00e2b01e8ed39407729c4990aeda961f83a586f975e8a"
CHECKSUM_arm64="d90446719b815e3abfe7b2c46ddf8b3fda17599f03ab370d6e47b1580c0e869e"
CHECKSUM=CHECKSUM_${TARGETARCH}
curl --silent --fail -L -o /opt/kubernetes/bin/kubectl@1.28 https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/kubectl@1.28" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/kubectl@1.28
curl --silent --fail -L -o /opt/kubernetes/bin/kubectl@1.30 https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/${TARGETARCH}/kubectl
echo "${!CHECKSUM} /opt/kubernetes/bin/kubectl@1.30" | sha256sum --check --status
chmod +x /opt/kubernetes/bin/kubectl@1.30
EOF

RUN <<EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ fi
KUBECTL_VERSION=$(kubectl version -o json | jq -re '[.serverVersion.major,.serverVersion.minor]|join(".")' | sed -e 's/^\([1-9]*.[1-9]*\).*$/\1/')

case "$KUBECTL_VERSION" in
1.2[0123])
KUBECTL_VERSION=1.24
1.2[0123456])
KUBECTL_VERSION=1.27
;;
1.2[9])
KUBECTL_VERSION=1.28
1.30)
KUBECTL_VERSION=1.30
;;
1.3*)
KUBECTL_VERSION=1.28
KUBECTL_VERSION=1.30
;;
esac

if [ -z "$KUBECTL_VERSION" ]; then
KUBECTL_VERSION=1.28
KUBECTL_VERSION=1.29
fi

# Restrict access permissions on kubeconfig file as some clients will complain
Expand Down
54 changes: 12 additions & 42 deletions workshop-images/base-environment/opt/gateway/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions workshop-images/base-environment/opt/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"uuid": "^9.0.1",
"winston": "^3.11.0",
"ws": "^8.14.2",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0",
"xterm-addon-web-links": "^0.9.0"
"@xterm/xterm": "^5.5.0",
"@xterm/addon-fit": "^0.10.0",
"@xterm/addon-web-links": "^0.11.0"
},
"devDependencies": {
"@types/bootstrap": "^5.2.9",
Expand Down
Loading

0 comments on commit 7040630

Please sign in to comment.