Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ tests:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: IPv4
type: AWS
- name: should be able to set dnsType to non-default value of `ClusterHosted`
initial: |
Expand All @@ -84,6 +85,7 @@ tests:
aws:
cloudLoadBalancerConfig:
dnsType: ClusterHosted
ipFamily: IPv4
type: AWS
expected: |
apiVersion: config.openshift.io/v1
Expand All @@ -101,6 +103,7 @@ tests:
aws:
cloudLoadBalancerConfig:
dnsType: ClusterHosted
ipFamily: IPv4
type: AWS
- name: Should not allow changing the immutable dnsType field
initial: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ tests:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: IPv4
type: AWS
- name: should be able to set dnsType to non-default value of `ClusterHosted`
initial: |
Expand All @@ -84,6 +85,7 @@ tests:
aws:
cloudLoadBalancerConfig:
dnsType: ClusterHosted
ipFamily: IPv4
type: AWS
expected: |
apiVersion: config.openshift.io/v1
Expand All @@ -101,6 +103,7 @@ tests:
aws:
cloudLoadBalancerConfig:
dnsType: ClusterHosted
ipFamily: IPv4
type: AWS
- name: Should not allow changing the immutable dnsType field
initial: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "Infrastructure"
crdName: infrastructures.config.openshift.io
featureGates:
- AWSDualStackInstall
tests:
onCreate:
- name: Should be able to create a minimal Infrastructure
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec: {} # No spec is required for a Infrastructure
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec: {}
onUpdate:
- name: ipFamily should default to `IPv4` when not specified
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
aws: {}
type: AWS
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws: {}
type: AWS
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: AWS
aws: {}
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws: {}
type: AWS
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: AWS
aws: {}
status:
controlPlaneTopology: HighlyAvailable
cpuPartitioning: None
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: IPv4
type: AWS
- name: should be able to set ipFamily to non-default value of `DualStack`
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
aws: {}
type: AWS
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: AWS
aws: {}
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
ipFamily: DualStack
type: AWS
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: AWS
aws: {}
status:
controlPlaneTopology: HighlyAvailable
cpuPartitioning: None
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: DualStack
type: AWS
- name: Should not allow changing the immutable ipFamily field
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
aws: {}
type: AWS
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
ipFamily: DualStack
type: AWS
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: AWS
aws: {}
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
ipFamily: IPv4
type: AWS
expectedStatusError: "status.platformStatus.aws.ipFamily: Invalid value: \"string\": ipFamily is immutable once set"
- name: Should not accept random strings for IpFamily
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
aws: {}
type: AWS
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
ipFamily: IPv4
type: AWS
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: AWS
aws: {}
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: AWS
platformStatus:
aws:
ipFamily: "OpenShift"
type: AWS
expectedStatusError: "status.platformStatus.aws.ipFamily: Unsupported value: \"OpenShift\": supported values: \"IPv4\", \"DualStack\""
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ tests:
azure:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: IPv4
type: Azure
- name: should be able to set dnsType to non-default value of `ClusterHosted`
initial: |
Expand All @@ -84,6 +85,7 @@ tests:
azure:
cloudLoadBalancerConfig:
dnsType: ClusterHosted
ipFamily: IPv4
type: Azure
expected: |
apiVersion: config.openshift.io/v1
Expand All @@ -101,6 +103,7 @@ tests:
azure:
cloudLoadBalancerConfig:
dnsType: ClusterHosted
ipFamily: IPv4
type: Azure
- name: Should not allow changing the immutable dnsType field
initial: |
Expand Down
Loading