mirror of https://github.com/kubernetes/kops.git
Add integration test
This commit is contained in:
parent
f60df9b955
commit
0207d94201
|
|
@ -69,6 +69,11 @@ func TestCreateClusterOverride(t *testing.T) {
|
|||
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/overrides", "v1alpha2")
|
||||
}
|
||||
|
||||
// TestCreateClusterKubernetesFeatureGates tests the override flag
|
||||
func TestCreateClusterKubernetesFeatureGates(t *testing.T) {
|
||||
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal_feature-gates", "v1alpha2")
|
||||
}
|
||||
|
||||
// TestCreateClusterComplex runs kops create cluster, with a grab-bag of edge cases
|
||||
func TestCreateClusterComplex(t *testing.T) {
|
||||
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/complex", "v1alpha2")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,121 @@
|
|||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: Cluster
|
||||
metadata:
|
||||
creationTimestamp: "2017-01-01T00:00:00Z"
|
||||
name: minimal.example.com
|
||||
spec:
|
||||
api:
|
||||
dns: {}
|
||||
authorization:
|
||||
rbac: {}
|
||||
channel: stable
|
||||
cloudProvider: aws
|
||||
configBase: memfs://tests/minimal.example.com
|
||||
etcdClusters:
|
||||
- cpuRequest: 200m
|
||||
etcdMembers:
|
||||
- encryptedVolume: true
|
||||
instanceGroup: master-us-test-1a
|
||||
name: a
|
||||
memoryRequest: 100Mi
|
||||
name: main
|
||||
- cpuRequest: 100m
|
||||
etcdMembers:
|
||||
- encryptedVolume: true
|
||||
instanceGroup: master-us-test-1a
|
||||
name: a
|
||||
memoryRequest: 100Mi
|
||||
name: events
|
||||
iam:
|
||||
allowContainerRegistry: true
|
||||
legacy: false
|
||||
kubeAPIServer:
|
||||
featureGates:
|
||||
APIResponseCompression: "false"
|
||||
ReadWriteOncePod: "true"
|
||||
SELinuxMountReadWriteOncePod: "true"
|
||||
kubeControllerManager:
|
||||
featureGates:
|
||||
APIResponseCompression: "false"
|
||||
ReadWriteOncePod: "true"
|
||||
SELinuxMountReadWriteOncePod: "true"
|
||||
kubeProxy:
|
||||
featureGates:
|
||||
APIResponseCompression: "false"
|
||||
ReadWriteOncePod: "true"
|
||||
SELinuxMountReadWriteOncePod: "true"
|
||||
kubeScheduler:
|
||||
featureGates:
|
||||
APIResponseCompression: "false"
|
||||
ReadWriteOncePod: "true"
|
||||
SELinuxMountReadWriteOncePod: "true"
|
||||
kubelet:
|
||||
anonymousAuth: false
|
||||
featureGates:
|
||||
APIResponseCompression: "false"
|
||||
ReadWriteOncePod: "true"
|
||||
SELinuxMountReadWriteOncePod: "true"
|
||||
kubernetesApiAccess:
|
||||
- 0.0.0.0/0
|
||||
- ::/0
|
||||
kubernetesVersion: v1.26.0
|
||||
masterPublicName: api.minimal.example.com
|
||||
networkCIDR: 172.20.0.0/16
|
||||
networking:
|
||||
cni: {}
|
||||
nonMasqueradeCIDR: 100.64.0.0/10
|
||||
sshAccess:
|
||||
- 0.0.0.0/0
|
||||
- ::/0
|
||||
subnets:
|
||||
- cidr: 172.20.32.0/19
|
||||
name: us-test-1a
|
||||
type: Public
|
||||
zone: us-test-1a
|
||||
topology:
|
||||
dns:
|
||||
type: Public
|
||||
masters: public
|
||||
nodes: public
|
||||
|
||||
---
|
||||
|
||||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: InstanceGroup
|
||||
metadata:
|
||||
creationTimestamp: "2017-01-01T00:00:00Z"
|
||||
labels:
|
||||
kops.k8s.io/cluster: minimal.example.com
|
||||
name: master-us-test-1a
|
||||
spec:
|
||||
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20221018
|
||||
instanceMetadata:
|
||||
httpPutResponseHopLimit: 3
|
||||
httpTokens: required
|
||||
machineType: m3.medium
|
||||
maxSize: 1
|
||||
minSize: 1
|
||||
role: Master
|
||||
subnets:
|
||||
- us-test-1a
|
||||
|
||||
---
|
||||
|
||||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: InstanceGroup
|
||||
metadata:
|
||||
creationTimestamp: "2017-01-01T00:00:00Z"
|
||||
labels:
|
||||
kops.k8s.io/cluster: minimal.example.com
|
||||
name: nodes-us-test-1a
|
||||
spec:
|
||||
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20221018
|
||||
instanceMetadata:
|
||||
httpPutResponseHopLimit: 1
|
||||
httpTokens: required
|
||||
machineType: t2.medium
|
||||
maxSize: 1
|
||||
minSize: 1
|
||||
role: Node
|
||||
subnets:
|
||||
- us-test-1a
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
ClusterName: minimal.example.com
|
||||
Zones:
|
||||
- us-test-1a
|
||||
CloudProvider: aws
|
||||
Networking: cni
|
||||
KubernetesVersion: v1.26.0
|
||||
KubernetesFeatureGates:
|
||||
- SELinuxMountReadWriteOncePod
|
||||
- +ReadWriteOncePod
|
||||
- -APIResponseCompression
|
||||
Loading…
Reference in New Issue