|
| 1 | +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this |
| 2 | +name: "Infrastructure" |
| 3 | +crdName: infrastructures.config.openshift.io |
| 4 | +featureGates: |
| 5 | +- GCPSovereignCloudInstall |
| 6 | +tests: |
| 7 | + onCreate: |
| 8 | + - name: Should be able to create a minimal Infrastructure |
| 9 | + initial: | |
| 10 | + apiVersion: config.openshift.io/v1 |
| 11 | + kind: Infrastructure |
| 12 | + spec: {} # No spec is required for a Infrastructure |
| 13 | + expected: | |
| 14 | + apiVersion: config.openshift.io/v1 |
| 15 | + kind: Infrastructure |
| 16 | + spec: {} |
| 17 | + onUpdate: |
| 18 | + - name: Should be able to set a valid GCP universeDomain |
| 19 | + initial: | |
| 20 | + apiVersion: config.openshift.io/v1 |
| 21 | + kind: Infrastructure |
| 22 | + spec: {} |
| 23 | + status: |
| 24 | + controlPlaneTopology: "HighlyAvailable" |
| 25 | + infrastructureTopology: "HighlyAvailable" |
| 26 | + platform: GCP |
| 27 | + platformStatus: |
| 28 | + type: GCP |
| 29 | + gcp: |
| 30 | + cloudLoadBalancerConfig: |
| 31 | + dnsType: PlatformDefault |
| 32 | + updated: | |
| 33 | + apiVersion: config.openshift.io/v1 |
| 34 | + kind: Infrastructure |
| 35 | + spec: {} |
| 36 | + status: |
| 37 | + controlPlaneTopology: "HighlyAvailable" |
| 38 | + cpuPartitioning: "None" |
| 39 | + infrastructureTopology: "HighlyAvailable" |
| 40 | + platform: GCP |
| 41 | + platformStatus: |
| 42 | + type: GCP |
| 43 | + gcp: |
| 44 | + cloudLoadBalancerConfig: |
| 45 | + dnsType: PlatformDefault |
| 46 | + universeDomain: googleapis.com |
| 47 | + expected: | |
| 48 | + apiVersion: config.openshift.io/v1 |
| 49 | + kind: Infrastructure |
| 50 | + spec: {} |
| 51 | + status: |
| 52 | + controlPlaneTopology: "HighlyAvailable" |
| 53 | + cpuPartitioning: "None" |
| 54 | + infrastructureTopology: "HighlyAvailable" |
| 55 | + platform: GCP |
| 56 | + platformStatus: |
| 57 | + type: GCP |
| 58 | + gcp: |
| 59 | + cloudLoadBalancerConfig: |
| 60 | + dnsType: PlatformDefault |
| 61 | + universeDomain: googleapis.com |
| 62 | + - name: Should be able to set a sovereign cloud GCP universeDomain |
| 63 | + initial: | |
| 64 | + apiVersion: config.openshift.io/v1 |
| 65 | + kind: Infrastructure |
| 66 | + spec: {} |
| 67 | + status: |
| 68 | + controlPlaneTopology: "HighlyAvailable" |
| 69 | + infrastructureTopology: "HighlyAvailable" |
| 70 | + platform: GCP |
| 71 | + platformStatus: |
| 72 | + type: GCP |
| 73 | + gcp: |
| 74 | + cloudLoadBalancerConfig: |
| 75 | + dnsType: PlatformDefault |
| 76 | + updated: | |
| 77 | + apiVersion: config.openshift.io/v1 |
| 78 | + kind: Infrastructure |
| 79 | + spec: {} |
| 80 | + status: |
| 81 | + controlPlaneTopology: "HighlyAvailable" |
| 82 | + infrastructureTopology: "HighlyAvailable" |
| 83 | + platform: GCP |
| 84 | + platformStatus: |
| 85 | + type: GCP |
| 86 | + gcp: |
| 87 | + cloudLoadBalancerConfig: |
| 88 | + dnsType: PlatformDefault |
| 89 | + universeDomain: s3nsapis.fr |
| 90 | + expected: | |
| 91 | + apiVersion: config.openshift.io/v1 |
| 92 | + kind: Infrastructure |
| 93 | + spec: {} |
| 94 | + status: |
| 95 | + controlPlaneTopology: "HighlyAvailable" |
| 96 | + cpuPartitioning: "None" |
| 97 | + infrastructureTopology: "HighlyAvailable" |
| 98 | + platform: GCP |
| 99 | + platformStatus: |
| 100 | + type: GCP |
| 101 | + gcp: |
| 102 | + cloudLoadBalancerConfig: |
| 103 | + dnsType: PlatformDefault |
| 104 | + universeDomain: s3nsapis.fr |
| 105 | + - name: Should not allow an invalid GCP universeDomain with uppercase characters |
| 106 | + initial: | |
| 107 | + apiVersion: config.openshift.io/v1 |
| 108 | + kind: Infrastructure |
| 109 | + spec: {} |
| 110 | + status: |
| 111 | + controlPlaneTopology: "HighlyAvailable" |
| 112 | + infrastructureTopology: "HighlyAvailable" |
| 113 | + platform: GCP |
| 114 | + platformStatus: |
| 115 | + type: GCP |
| 116 | + gcp: |
| 117 | + cloudLoadBalancerConfig: |
| 118 | + dnsType: PlatformDefault |
| 119 | + updated: | |
| 120 | + apiVersion: config.openshift.io/v1 |
| 121 | + kind: Infrastructure |
| 122 | + spec: {} |
| 123 | + status: |
| 124 | + controlPlaneTopology: "HighlyAvailable" |
| 125 | + infrastructureTopology: "HighlyAvailable" |
| 126 | + platform: GCP |
| 127 | + platformStatus: |
| 128 | + type: GCP |
| 129 | + gcp: |
| 130 | + cloudLoadBalancerConfig: |
| 131 | + dnsType: PlatformDefault |
| 132 | + universeDomain: GoogleApis.Com |
| 133 | + expectedStatusError: "universeDomain must be a valid DNS subdomain" |
| 134 | + - name: Should not allow an invalid GCP universeDomain with spaces |
| 135 | + initial: | |
| 136 | + apiVersion: config.openshift.io/v1 |
| 137 | + kind: Infrastructure |
| 138 | + spec: {} |
| 139 | + status: |
| 140 | + controlPlaneTopology: "HighlyAvailable" |
| 141 | + infrastructureTopology: "HighlyAvailable" |
| 142 | + platform: GCP |
| 143 | + platformStatus: |
| 144 | + type: GCP |
| 145 | + gcp: |
| 146 | + cloudLoadBalancerConfig: |
| 147 | + dnsType: PlatformDefault |
| 148 | + updated: | |
| 149 | + apiVersion: config.openshift.io/v1 |
| 150 | + kind: Infrastructure |
| 151 | + spec: {} |
| 152 | + status: |
| 153 | + controlPlaneTopology: "HighlyAvailable" |
| 154 | + infrastructureTopology: "HighlyAvailable" |
| 155 | + platform: GCP |
| 156 | + platformStatus: |
| 157 | + type: GCP |
| 158 | + gcp: |
| 159 | + cloudLoadBalancerConfig: |
| 160 | + dnsType: PlatformDefault |
| 161 | + universeDomain: "not a domain" |
| 162 | + expectedStatusError: "universeDomain must be a valid DNS subdomain" |
| 163 | + - name: Should not allow a GCP universeDomain starting with a hyphen |
| 164 | + initial: | |
| 165 | + apiVersion: config.openshift.io/v1 |
| 166 | + kind: Infrastructure |
| 167 | + spec: {} |
| 168 | + status: |
| 169 | + controlPlaneTopology: "HighlyAvailable" |
| 170 | + infrastructureTopology: "HighlyAvailable" |
| 171 | + platform: GCP |
| 172 | + platformStatus: |
| 173 | + type: GCP |
| 174 | + gcp: |
| 175 | + cloudLoadBalancerConfig: |
| 176 | + dnsType: PlatformDefault |
| 177 | + updated: | |
| 178 | + apiVersion: config.openshift.io/v1 |
| 179 | + kind: Infrastructure |
| 180 | + spec: {} |
| 181 | + status: |
| 182 | + controlPlaneTopology: "HighlyAvailable" |
| 183 | + infrastructureTopology: "HighlyAvailable" |
| 184 | + platform: GCP |
| 185 | + platformStatus: |
| 186 | + type: GCP |
| 187 | + gcp: |
| 188 | + cloudLoadBalancerConfig: |
| 189 | + dnsType: PlatformDefault |
| 190 | + universeDomain: "-invalid.com" |
| 191 | + expectedStatusError: "universeDomain must be a valid DNS subdomain" |
0 commit comments