forked from k0sproject/k0smotron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request k0sproject#849 from k0sproject/dependabot/pip/docs…
…/mkdocs-3ba6cc2ae5 Bump mkdocs-material from 9.5.47 to 9.5.48 in /docs in the mkdocs group
- Loading branch information
Showing
15 changed files
with
1,100 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,6 @@ k0smotron-image-bundle.tar | |
*.swp | ||
*.swo | ||
*~ | ||
|
||
# test results | ||
_artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Copyright 2024. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
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 | ||
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 e2e | ||
|
||
// Test suite constants for e2e config variables. | ||
const ( | ||
KubernetesVersion = "KUBERNETES_VERSION" | ||
KubernetesVersionManagement = "KUBERNETES_VERSION_MANAGEMENT" | ||
KubernetesVersionFirstUpgradeTo = "KUBERNETES_VERSION_FIRST_UPGRADE_TO" | ||
KubernetesVersionSecondUpgradeTo = "KUBERNETES_VERSION_SECOND_UPGRADE_TO" | ||
ControlPlaneMachineCount = "CONTROL_PLANE_MACHINE_COUNT" | ||
IPFamily = "IP_FAMILY" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
# E2E test scenario using local dev images and manifests built from the source tree for following providers: | ||
# - cluster-api | ||
# - bootstrap k0smotron | ||
# - control-plane k0smotron | ||
# - infrastructure docker | ||
images: | ||
- name: quay.io/k0sproject/k0smotron | ||
loadBehavior: mustLoad | ||
|
||
providers: | ||
- name: cluster-api | ||
type: CoreProvider | ||
versions: | ||
- name: v1.8.5 | ||
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/core-components.yaml | ||
type: url | ||
contract: v1beta1 | ||
files: | ||
- sourcePath: "../data/shared/v1beta1/metadata.yaml" | ||
replacements: | ||
- old: "imagePullPolicy: Always" | ||
new: "imagePullPolicy: IfNotPresent" | ||
- name: docker | ||
type: InfrastructureProvider | ||
versions: | ||
- name: v1.8.1 | ||
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.1/infrastructure-components-development.yaml | ||
type: url | ||
contract: v1beta1 | ||
files: | ||
- sourcePath: "../data/shared/v1beta1/metadata.yaml" | ||
replacements: | ||
- old: "imagePullPolicy: Always" | ||
new: "imagePullPolicy: IfNotPresent" | ||
files: | ||
- sourcePath: "../data/infrastructure-docker/cluster-template-ooc.yaml" | ||
- name: k0sproject-k0smotron | ||
type: ControlPlaneProvider | ||
versions: | ||
- name: v1.2.99 | ||
value: ../../config/default | ||
contract: v1beta1 | ||
files: | ||
- sourcePath: "../../metadata.yaml" | ||
replacements: | ||
- old: "imagePullPolicy: Always" | ||
new: "imagePullPolicy: IfNotPresent" | ||
- old: "image: k0s/k0smotron:latest" | ||
new: "image: quay.io/k0sproject/k0smotron:latest" | ||
|
||
variables: | ||
KUBERNETES_VERSION_MANAGEMENT: "v1.30.0" | ||
KUBERNETES_VERSION: "v1.31.0" | ||
KUBERNETES_VERSION_FIRST_UPGRADE_TO: "v1.30.2+k0s.0" | ||
KUBERNETES_VERSION_SECOND_UPGRADE_TO: "v1.31.2+k0s.0" | ||
IP_FAMILY: "IPv4" | ||
KIND_IMAGE_VERSION: "v1.30.0" | ||
# Used during clusterctl upgrade test | ||
CAPI_CORE_VERSION: "1.8.5" | ||
# Enabling the feature flags by setting the env variables. | ||
CLUSTER_TOPOLOGY: "true" | ||
EXP_MACHINE_POOL: "true" | ||
|
||
intervals: | ||
# The array is defined as [timeout, polling interval] | ||
# copied from https://github.com/kubernetes-sigs/cluster-api/blob/main/test/e2e/config/docker.yaml | ||
default/wait-controllers: ["3m", "10s"] | ||
default/wait-cluster: ["5m", "10s"] | ||
default/wait-control-plane: ["10m", "10s"] | ||
default/wait-worker-nodes: ["10m", "10s"] | ||
default/wait-machine-pool-nodes: ["10m", "10s"] | ||
default/wait-delete-cluster: ["3m", "10s"] | ||
default/wait-machine-upgrade: ["30m", "10s"] | ||
default/wait-machine-pool-upgrade: ["30m", "10s"] | ||
default/wait-nodes-ready: ["10m", "10s"] | ||
default/wait-machine-remediation: ["5m", "10s"] | ||
default/wait-autoscaler: ["5m", "10s"] | ||
node-drain/wait-deployment-available: ["3m", "10s"] | ||
node-drain/wait-control-plane: ["15m", "10s"] | ||
node-drain/wait-machine-deleted: ["2m", "10s"] | ||
kcp-remediation/wait-machines: ["5m", "10s"] | ||
kcp-remediation/check-machines-stable: ["30s", "5s"] | ||
kcp-remediation/wait-machine-provisioned: ["5m", "10s"] | ||
# Giving a bit more time during scale tests, we analyze independently if everything works quickly enough. | ||
scale/wait-cluster: ["10m", "10s"] | ||
scale/wait-control-plane: ["20m", "10s"] | ||
scale/wait-worker-nodes: ["20m", "10s"] |
135 changes: 135 additions & 0 deletions
135
e2e/data/infrastructure-docker/cluster-template-ooc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
namespace: ${NAMESPACE} | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.0.0/16 | ||
serviceDomain: cluster.local | ||
services: | ||
cidrBlocks: | ||
- 10.128.0.0/12 | ||
controlPlaneRef: | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: K0sControlPlane | ||
name: ${CLUSTER_NAME}-docker-test | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerCluster | ||
name: docker-test | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachineTemplate | ||
metadata: | ||
name: docker-test-cp-template | ||
namespace: ${NAMESPACE} | ||
spec: | ||
template: | ||
spec: | ||
customImage: kindest/node:v1.31.0 | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: K0sControlPlane | ||
metadata: | ||
name: ${CLUSTER_NAME}-docker-test | ||
namespace: ${NAMESPACE} | ||
spec: | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
version: v1.30.1+k0s.0 | ||
k0sConfigSpec: | ||
args: | ||
- --enable-worker | ||
k0s: | ||
apiVersion: k0s.k0sproject.io/v1beta1 | ||
kind: ClusterConfig | ||
metadata: | ||
name: k0s | ||
spec: | ||
api: | ||
extraArgs: | ||
anonymous-auth: "true" | ||
telemetry: | ||
enabled: false | ||
network: | ||
controlPlaneLoadBalancing: | ||
enabled: false | ||
files: | ||
- path: /tmp/test-file-secret | ||
contentFrom: | ||
secretRef: | ||
name: test-file-secret | ||
key: value | ||
machineTemplate: | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachineTemplate | ||
name: docker-test-cp-template | ||
namespace: ${NAMESPACE} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerCluster | ||
metadata: | ||
name: docker-test | ||
namespace: ${NAMESPACE} | ||
spec: | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Machine | ||
metadata: | ||
name: ${CLUSTER_NAME}-docker-test-worker-0 | ||
namespace: ${NAMESPACE} | ||
spec: | ||
version: v1.30.1 | ||
clusterName: ${CLUSTER_NAME} | ||
bootstrap: | ||
configRef: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: K0sWorkerConfig | ||
name: docker-test-worker-0 | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachine | ||
name: ${CLUSTER_NAME}-docker-test-worker-0 | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: K0sWorkerConfig | ||
metadata: | ||
name: docker-test-worker-0 | ||
namespace: ${NAMESPACE} | ||
spec: | ||
# version is deliberately different to be able to verify we actually pick it up :) | ||
version: v1.30.1+k0s.0 | ||
args: | ||
- --labels=k0sproject.io/foo=bar | ||
preStartCommands: | ||
- echo -n "pre-start" > /tmp/pre-start | ||
postStartCommands: | ||
- echo -n "post-start" > /tmp/post-start | ||
files: | ||
- path: /tmp/test-file | ||
content: test-file | ||
- path: /tmp/test-file-secret | ||
contentFrom: | ||
secretRef: | ||
name: test-file-secret | ||
key: value | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachine | ||
metadata: | ||
name: ${CLUSTER_NAME}-docker-test-worker-0 | ||
namespace: ${NAMESPACE} | ||
spec: | ||
customImage: kindest/node:v1.31.0 | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: test-file-secret | ||
namespace: ${NAMESPACE} | ||
type: Opaque | ||
data: | ||
value: dGVzdA== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# maps release series of major.minor to cluster-api contract version, | ||
# update this file only when you update the version for cluster-api | ||
# CoreProvider and docker InfrastructureProvider in test/e2e/config/k3s-docker.yaml | ||
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 | ||
kind: Metadata | ||
releaseSeries: | ||
- major: 1 | ||
minor: 8 | ||
contract: v1beta1 |
Oops, something went wrong.