Skip to content

Commit

Permalink
Remove proxy and child resources, might added back in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Chang committed Feb 26, 2025
1 parent ae6684d commit b9454a4
Show file tree
Hide file tree
Showing 24 changed files with 30 additions and 284 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@
"version": {
"id": "nsj"
},
"disableUserWorkloadMonitoring": true,
"proxy": {
"httpProxy": "sjjbjvkimlvtwdnwjodcajidcoompt",
"httpsProxy": "xwjukendejiksp",
"noProxy": "mlsbdpjpyzpydpkeqvt",
"trustedCa": "uxebp"
}
"disableUserWorkloadMonitoring": true
}
}
}
Expand Down Expand Up @@ -60,12 +54,6 @@
"url": "dkjmzzhkvyoqx",
"visibility": "public"
},
"proxy": {
"httpProxy": "sjjbjvkimlvtwdnwjodcajidcoompt",
"httpsProxy": "xwjukendejiksp",
"noProxy": "mlsbdpjpyzpydpkeqvt",
"trustedCa": "uxebp"
},
"platform": {
"managedResourceGroup": "nhyhywrxupo",
"subnetId": "/subscriptions/FDEA43EA-0230-4A7D-BDEE-F3AFF2183B1D/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/hcp-network-example/subnets/example-subnet",
Expand Down
23 changes: 0 additions & 23 deletions api/redhatopenshift/HcpCluster.Management/hcpCluster-models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ model HcpOpenShiftClusterProperties {
@visibility("create", "update")
disableUserWorkloadMonitoring?: boolean = false;

/** Openshift cluster proxy configuration */
@visibility("create", "update")
proxy?: ProxyProfile;

/** Azure platform configuration */
@visibility("create", "read")
platform?: PlatformProfile;
Expand All @@ -117,10 +113,6 @@ model HcpOpenShiftClusterPatchProperties {
/** Disable user workload monitoring */
@visibility("update")
disableUserWorkloadMonitoring?: boolean;

/** Openshift cluster proxy configuration */
@visibility("update")
proxy?: ProxyProfile;
}

model ManagedServiceIdentityUpdate
Expand Down Expand Up @@ -271,21 +263,6 @@ union Visibility {
private: "private",
}

/** OpenShift cluster proxy configuration */
model ProxyProfile {
/** http proxy config */
httpProxy?: url;

/** https proxy config */
httpsProxy?: url;

/** no proxy config */
noProxy?: string;

/** The trusted CA for the proxy */
trustedCa?: string;
}

/** Azure specific configuration */
model PlatformProfile {
/** Resource group to put cluster resources */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@
"version": {
"id": "nsj"
},
"disableUserWorkloadMonitoring": true,
"proxy": {
"httpProxy": "sjjbjvkimlvtwdnwjodcajidcoompt",
"httpsProxy": "xwjukendejiksp",
"noProxy": "mlsbdpjpyzpydpkeqvt",
"trustedCa": "uxebp"
}
"disableUserWorkloadMonitoring": true
}
}
}
Expand Down Expand Up @@ -60,12 +54,6 @@
"url": "dkjmzzhkvyoqx",
"visibility": "public"
},
"proxy": {
"httpProxy": "sjjbjvkimlvtwdnwjodcajidcoompt",
"httpsProxy": "xwjukendejiksp",
"noProxy": "mlsbdpjpyzpydpkeqvt",
"trustedCa": "uxebp"
},
"platform": {
"managedResourceGroup": "nhyhywrxupo",
"subnetId": "/subscriptions/FDEA43EA-0230-4A7D-BDEE-F3AFF2183B1D/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/hcp-network-example/subnets/example-subnet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1333,13 +1333,6 @@
"x-ms-mutability": [
"update"
]
},
"proxy": {
"$ref": "#/definitions/ProxyProfile",
"description": "Openshift cluster proxy configuration",
"x-ms-mutability": [
"update"
]
}
}
},
Expand Down Expand Up @@ -1400,14 +1393,6 @@
"create"
]
},
"proxy": {
"$ref": "#/definitions/ProxyProfile",
"description": "Openshift cluster proxy configuration",
"x-ms-mutability": [
"update",
"create"
]
},
"platform": {
"$ref": "#/definitions/PlatformProfile",
"description": "Azure platform configuration",
Expand Down Expand Up @@ -1982,30 +1967,6 @@
},
"readOnly": true
},
"ProxyProfile": {
"type": "object",
"description": "OpenShift cluster proxy configuration",
"properties": {
"httpProxy": {
"type": "string",
"format": "uri",
"description": "http proxy config"
},
"httpsProxy": {
"type": "string",
"format": "uri",
"description": "https proxy config"
},
"noProxy": {
"type": "string",
"description": "no proxy config"
},
"trustedCa": {
"type": "string",
"description": "The trusted CA for the proxy"
}
}
},
"SubnetResourceId": {
"type": "string",
"format": "arm-id",
Expand Down
4 changes: 2 additions & 2 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require (
github.com/golang/glog v1.2.4 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
Expand All @@ -50,7 +50,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_golang v1.21.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
Expand Down Expand Up @@ -131,8 +131,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA=
github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
Expand Down
27 changes: 1 addition & 26 deletions frontend/pkg/frontend/ocm.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ func ConvertCStoHCPOpenShiftCluster(resourceID *azcorearm.ResourceID, cluster *a
},
EtcdEncryption: cluster.EtcdEncryption(),
DisableUserWorkloadMonitoring: cluster.DisableUserWorkloadMonitoring(),
Proxy: api.ProxyProfile{
HTTPProxy: cluster.Proxy().HTTPProxy(),
HTTPSProxy: cluster.Proxy().HTTPSProxy(),
NoProxy: cluster.Proxy().NoProxy(),
TrustedCA: cluster.AdditionalTrustBundle(),
},
Platform: api.PlatformProfile{
ManagedResourceGroup: cluster.Azure().ManagedResourceGroupName(),
SubnetID: cluster.Azure().SubnetResourceID(),
Expand Down Expand Up @@ -269,27 +263,8 @@ func (f *Frontend) BuildCSCluster(resourceID *azcorearm.ResourceID, requestHeade
}
}

proxyBuilder := arohcpv1alpha1.NewProxy()
// Cluster Service allows an empty HTTPProxy on PATCH but not PUT.
if updating || hcpCluster.Properties.Proxy.HTTPProxy != "" {
proxyBuilder = proxyBuilder.
HTTPProxy(hcpCluster.Properties.Proxy.HTTPProxy)
}
// Cluster Service allows an empty HTTPSProxy on PATCH but not PUT.
if updating || hcpCluster.Properties.Proxy.HTTPSProxy != "" {
proxyBuilder = proxyBuilder.
HTTPSProxy(hcpCluster.Properties.Proxy.HTTPSProxy)
}
// Cluster Service allows an empty HTTPSProxy on PATCH but not PUT.
if updating || hcpCluster.Properties.Proxy.NoProxy != "" {
proxyBuilder = proxyBuilder.
NoProxy(hcpCluster.Properties.Proxy.NoProxy)
}

clusterBuilder = clusterBuilder.
DisableUserWorkloadMonitoring(hcpCluster.Properties.DisableUserWorkloadMonitoring).
Proxy(proxyBuilder).
AdditionalTrustBundle(hcpCluster.Properties.Proxy.TrustedCA)
DisableUserWorkloadMonitoring(hcpCluster.Properties.DisableUserWorkloadMonitoring)

clusterBuilder = f.clusterServiceClient.AddProperties(clusterBuilder)

Expand Down
1 change: 0 additions & 1 deletion frontend/utils/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func CreateJSONFile() error {
},
EtcdEncryption: false,
DisableUserWorkloadMonitoring: false,
Proxy: api.ProxyProfile{},
Platform: api.PlatformProfile{
ManagedResourceGroup: "dev-test-mrg",
NetworkSecurityGroupID: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-test-rg/providers/Microsoft.Network/networkSecurityGroups/xyz",
Expand Down
7 changes: 3 additions & 4 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,6 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo=
github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/cyphar/filepath-securejoin v0.3.4/go.mod h1:8s/MCNJREmFK0H02MF6Ihv1nakJe4L/w3WZLHNkvlYM=
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec=
github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs=
Expand Down Expand Up @@ -1729,7 +1728,6 @@ github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
Expand Down Expand Up @@ -2170,6 +2168,7 @@ golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -2282,6 +2281,7 @@ golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk=
Expand Down Expand Up @@ -2317,6 +2317,7 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -2628,7 +2629,6 @@ honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0=
k8s.io/apiextensions-apiserver v0.32.0/go.mod h1:86hblMvN5yxMvZrZFX2OhIHAuFIMJIZ19bTvzkP+Fmw=
k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto=
k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c=
k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM=
Expand Down Expand Up @@ -2680,7 +2680,6 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsA
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
sigs.k8s.io/controller-runtime v0.20.1/go.mod h1:BrP3w158MwvB3ZbNpaAcIKkHQ7YGpYnzpoSTZ8E14WU=
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g=
sigs.k8s.io/kustomize/api v0.17.2/go.mod h1:UWTz9Ct+MvoeQsHcJ5e+vziRRkwimm3HytpZgIYqye0=
Expand Down
10 changes: 0 additions & 10 deletions internal/api/hcpopenshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type HCPOpenShiftClusterProperties struct {
API APIProfile `json:"api,omitempty" visibility:"read create"`
EtcdEncryption bool `json:"etcdEncryption,omitempty" visibility:"read create"`
DisableUserWorkloadMonitoring bool `json:"disableUserWorkloadMonitoring,omitempty" visibility:"read create update"`
Proxy ProxyProfile `json:"proxy,omitempty" visibility:"read create update"`
Platform PlatformProfile `json:"platform,omitempty" visibility:"read create"`
IssuerURL string `json:"issuerUrl,omitempty" visibility:"read"`
ExternalAuth ExternalAuthConfigProfile `json:"externalAuth,omitempty" visibility:"read create"`
Expand Down Expand Up @@ -67,15 +66,6 @@ type APIProfile struct {
Visibility Visibility `json:"visibility,omitempty" visibility:"read create" validate:"required_for_put,enum_visibility"`
}

// ProxyProfile represents the cluster proxy configuration.
// Visibility for the entire struct is "read create update".
type ProxyProfile struct {
HTTPProxy string `json:"httpProxy,omitempty" validate:"omitempty,url,startswith=http:"`
HTTPSProxy string `json:"httpsProxy,omitempty" validate:"omitempty,url"`
NoProxy string `json:"noProxy,omitempty"`
TrustedCA string `json:"trustedCa,omitempty" validate:"omitempty,pem_certificates"`
}

// PlatformProfile represents the Azure platform configuration.
// Visibility for the entire struct is "read create".
type PlatformProfile struct {
Expand Down
32 changes: 0 additions & 32 deletions internal/api/hcpopenshiftcluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,38 +242,6 @@ func TestClusterValidateTags(t *testing.T) {
},
},
},
{
name: "Bad startswith=http:",
tweaks: &HCPOpenShiftCluster{
Properties: HCPOpenShiftClusterProperties{
Proxy: ProxyProfile{
HTTPProxy: "ftp://not_an_http_url",
},
},
},
expectErrors: []arm.CloudErrorBody{
{
Message: "Invalid value 'ftp://not_an_http_url' for field 'httpProxy' (must start with 'http:')",
Target: "properties.proxy.httpProxy",
},
},
},
{
name: "Bad url",
tweaks: &HCPOpenShiftCluster{
Properties: HCPOpenShiftClusterProperties{
Proxy: ProxyProfile{
HTTPProxy: "http_but_not_a_url",
},
},
},
expectErrors: []arm.CloudErrorBody{
{
Message: "Invalid value 'http_but_not_a_url' for field 'httpProxy' (must be a URL)",
Target: "properties.proxy.httpProxy",
},
},
},
{
name: "Bad enum_managedserviceidentitytype",
tweaks: &HCPOpenShiftCluster{
Expand Down
Loading

0 comments on commit b9454a4

Please sign in to comment.