diff --git a/apis/v1alpha1/topologyspec.go b/apis/v1alpha1/topologyspec.go index 8ef592b..b85669d 100644 --- a/apis/v1alpha1/topologyspec.go +++ b/apis/v1alpha1/topologyspec.go @@ -110,7 +110,7 @@ type Expose struct { // +kubebuilder:validation:Enum=None;ClusterIP;LoadBalancer // +kubebuilder:default=LoadBalancer // +optional - ExposeType string `json:"exposeType"` + ExposeType string `json:"exposeType,omitempty"` } // Deployment holds configurations relevant to how clabernetes configures deployments that make diff --git a/clabverter/test-fixtures/golden/simple/topo01.yaml b/clabverter/test-fixtures/golden/simple/topo01.yaml index 86a2cdd..d722158 100755 --- a/clabverter/test-fixtures/golden/simple/topo01.yaml +++ b/clabverter/test-fixtures/golden/simple/topo01.yaml @@ -88,7 +88,6 @@ spec: expose: disableAutoExpose: false disableExpose: false - exposeType: "" imagePull: insecureRegistries: - 1.2.3.4 diff --git a/e2e/clabverter/clabverter_basic_test.go b/e2e/clabverter/clabverter_basic_test.go index 276319a..d97e2a7 100644 --- a/e2e/clabverter/clabverter_basic_test.go +++ b/e2e/clabverter/clabverter_basic_test.go @@ -50,6 +50,10 @@ func TestClabverterBasic(t *testing.T) { } defer func() { + if *clabernetestesthelper.SkipCleanup { + return + } + err = os.Remove("test-fixtures/10-apply.yaml") if err != nil { t.Errorf("failed cleaning up clabverted topology file, err: %s", err) diff --git a/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml b/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml index 844912a..24894c0 100755 --- a/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml +++ b/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml @@ -30,6 +30,7 @@ spec: expose: disableAutoExpose: false disableExpose: false + exposeType: LoadBalancer imagePull: {} naming: prefixed statusProbes: diff --git a/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml b/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml index ecc1d53..49d60fe 100755 --- a/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml +++ b/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml @@ -23,6 +23,7 @@ spec: expose: disableAutoExpose: false disableExpose: false + exposeType: LoadBalancer imagePull: {} naming: global statusProbes: diff --git a/e2e/topology/basic/test-fixtures/golden/20-topology.topology-basic.yaml b/e2e/topology/basic/test-fixtures/golden/20-topology.topology-basic.yaml index 45006e6..ca84831 100755 --- a/e2e/topology/basic/test-fixtures/golden/20-topology.topology-basic.yaml +++ b/e2e/topology/basic/test-fixtures/golden/20-topology.topology-basic.yaml @@ -28,6 +28,7 @@ spec: expose: disableAutoExpose: false disableExpose: false + exposeType: LoadBalancer imagePull: {} naming: global statusProbes: diff --git a/generated/openapi/openapi.json b/generated/openapi/openapi.json index 67e5338..5043eeb 100644 --- a/generated/openapi/openapi.json +++ b/generated/openapi/openapi.json @@ -1489,12 +1489,11 @@ }, "exposeType": { "default": "LoadBalancer", - "description": "ExposeType configures the service type(s) related to exposing the topology. This is an enum\nthat has the following valid values:\n- None: expose is *not* disabled, but we just don't create any services related to the pods,\n you may want to do this if you want to tickle the pods by pod name directly for some\n reason while not having extra services floating around.\n- ClusterIp: a clusterip service is created so you can hit that service name for the pods.\n- LoadBalancer: (default) creates a load balancer service so you can access your pods from\n outside the cluster. this is/was the only behavior up to v0.2.4.\n- Both: creates both a load balancer service and a cluster ip service.", + "description": "ExposeType configures the service type(s) related to exposing the topology. This is an enum\nthat has the following valid values:\n- None: expose is *not* disabled, but we just don't create any services related to the pods,\n you may want to do this if you want to tickle the pods by pod name directly for some\n reason while not having extra services floating around.\n- ClusterIP: a clusterip service is created so you can hit that service name for the pods.\n- LoadBalancer: (default) creates a load balancer service so you can access your pods from\n outside the cluster. this is/was the only behavior up to v0.2.4.", "enum": [ "None", - "ClusterIp", - "LoadBalancer", - "Both" + "ClusterIP", + "LoadBalancer" ], "type": "string" } diff --git a/generated/openapi/openapi_generated.go b/generated/openapi/openapi_generated.go index 63791e3..0a8456d 100644 --- a/generated/openapi/openapi_generated.go +++ b/generated/openapi/openapi_generated.go @@ -916,7 +916,6 @@ func schema_srl_labs_clabernetes_apis_v1alpha1_Expose( "exposeType": { SchemaProps: spec.SchemaProps{ Description: "ExposeType configures the service type(s) related to exposing the topology. This is an enum that has the following valid values: - None: expose is *not* disabled, but we just don't create any services related to the pods,\n you may want to do this if you want to tickle the pods by pod name directly for some\n reason while not having extra services floating around.\n- ClusterIP: a clusterip service is created so you can hit that service name for the pods. - LoadBalancer: (default) creates a load balancer service so you can access your pods from\n outside the cluster. this is/was the only behavior up to v0.2.4.", - Default: "", Type: []string{"string"}, Format: "", }, diff --git a/ui/clabernetes-openapi.json b/ui/clabernetes-openapi.json index 67e5338..5043eeb 100644 --- a/ui/clabernetes-openapi.json +++ b/ui/clabernetes-openapi.json @@ -1489,12 +1489,11 @@ }, "exposeType": { "default": "LoadBalancer", - "description": "ExposeType configures the service type(s) related to exposing the topology. This is an enum\nthat has the following valid values:\n- None: expose is *not* disabled, but we just don't create any services related to the pods,\n you may want to do this if you want to tickle the pods by pod name directly for some\n reason while not having extra services floating around.\n- ClusterIp: a clusterip service is created so you can hit that service name for the pods.\n- LoadBalancer: (default) creates a load balancer service so you can access your pods from\n outside the cluster. this is/was the only behavior up to v0.2.4.\n- Both: creates both a load balancer service and a cluster ip service.", + "description": "ExposeType configures the service type(s) related to exposing the topology. This is an enum\nthat has the following valid values:\n- None: expose is *not* disabled, but we just don't create any services related to the pods,\n you may want to do this if you want to tickle the pods by pod name directly for some\n reason while not having extra services floating around.\n- ClusterIP: a clusterip service is created so you can hit that service name for the pods.\n- LoadBalancer: (default) creates a load balancer service so you can access your pods from\n outside the cluster. this is/was the only behavior up to v0.2.4.", "enum": [ "None", - "ClusterIp", - "LoadBalancer", - "Both" + "ClusterIP", + "LoadBalancer" ], "type": "string" }