Skip to content
Merged
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
2 changes: 2 additions & 0 deletions components/api-server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v28.5.2+incompatible // indirect
Expand Down Expand Up @@ -112,6 +113,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
Expand Down
10 changes: 6 additions & 4 deletions components/api-server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.0.0-20190423183735-731ef375ac02/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
Expand Down Expand Up @@ -302,8 +303,9 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
Expand Down Expand Up @@ -514,8 +516,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
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 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
82 changes: 76 additions & 6 deletions components/api-server/openapi/openapi.gateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ paths:
$ref: '#/components/schemas/Gateway'
'400':
description: |
Validation errors occurred, including a cluster_id that is empty or does not
reference a ManagedCluster with a registered control plane (non-empty
oidc_subject). On update, cluster_id is validated only when it changes.
Validation errors occurred, including an invalid or unavailable placement
intent. The backend resolves a valid intent to a registered ManagedCluster
before creating the gateway.
content:
application/json:
schema:
Expand Down Expand Up @@ -90,6 +90,31 @@ paths:
application/json:
schema:
$ref: 'openapi.yaml#/components/schemas/Error'
/api/hypershell/v1/gateways/placement-availability:
get:
operationId: getGatewayPlacementAvailability
summary: Returns current provider placement eligibility
security:
- Bearer: []
responses:
'200':
description: Current backend placement eligibility
content:
application/json:
schema:
$ref: '#/components/schemas/GatewayPlacementAvailability'
'401':
description: Auth token is invalid
content:
application/json:
schema:
$ref: 'openapi.yaml#/components/schemas/Error'
'500':
description: Unexpected error evaluating placement availability
content:
application/json:
schema:
$ref: 'openapi.yaml#/components/schemas/Error'
# NEW ENDPOINT START
/api/hypershell/v1/gateways/{id}:
# NEW ENDPOINT END
Expand Down Expand Up @@ -329,12 +354,12 @@ components:
type: object
required:
- name
- cluster_id
- placement
properties:
name:
type: string
cluster_id:
type: string
placement:
$ref: '#/components/schemas/GatewayPlacementIntent'
external_dns:
type: string
tls_mode:
Expand Down Expand Up @@ -365,6 +390,51 @@ components:
credential_driver:
type: string
description: JSON-encoded credential storage driver configuration
GatewayPlacementIntent:
type: object
description: Exactly one of network/provider or mode must be supplied.
oneOf:
- title: Managed placement
required: [network, provider]
not:
required: [mode]
- title: Local Kind placement
required: [mode]
not:
anyOf:
- required: [network]
- required: [provider]
properties:
network:
type: string
enum: [public, vpn]
provider:
type: string
enum: [aws, ibm]
description: IBM Cloud supports public placement only; VPN requires AWS.
mode:
type: string
enum: [local-kind]
GatewayPlacementAvailability:
type: object
required: [aws_public, aws_vpn, ibm_public, ibm_vpn, local_kind]
properties:
aws_public:
type: boolean
aws_vpn:
type: boolean
ibm_public:
type: boolean
ibm_vpn:
type: boolean
local_kind:
type: boolean
aws_reason:
type: string
enum: [no-eligible-cluster]
ibm_reason:
type: string
enum: [no-eligible-cluster]
# NEW SCHEMA START
GatewayList:
# NEW SCHEMA END
Expand Down
14 changes: 14 additions & 0 deletions components/api-server/openapi/openapi.managedClusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ components:
type: string
provider:
type: string
description: Cloud provider capability used for gateway placement.
visibility:
type: string
enum: [public, vpn]
readOnly: true
description: Network visibility supported by this control plane for gateway placement.
region:
type: string
kubeconfig_secret:
Expand Down Expand Up @@ -329,6 +335,14 @@ components:
description:
type: string
description: Optional description of the spoke.
provider:
type: string
enum: [aws, ibm, kind]
description: Cloud provider hosting this control plane.
visibility:
type: string
enum: [public, vpn]
description: Network visibility supported for gateways on this control plane.
ManagedClusterRegistrationResponse:
type: object
required:
Expand Down
6 changes: 6 additions & 0 deletions components/api-server/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ paths:
$ref: 'openapi.managedClusters.yaml#/paths/~1api~1hypershell~1v1~1managed_clusters~1{id}'
/api/hypershell/v1/gateways:
$ref: 'openapi.gateways.yaml#/paths/~1api~1hypershell~1v1~1gateways'
/api/hypershell/v1/gateways/placement-availability:
$ref: 'openapi.gateways.yaml#/paths/~1api~1hypershell~1v1~1gateways~1placement-availability'
/api/hypershell/v1/gateways/{id}:
$ref: 'openapi.gateways.yaml#/paths/~1api~1hypershell~1v1~1gateways~1{id}'
/api/hypershell/v1/gateways/{gateway_id}/service_accounts:
Expand Down Expand Up @@ -136,6 +138,10 @@ components:
$ref: 'openapi.gateways.yaml#/components/schemas/GatewayList'
GatewayPatchRequest:
$ref: 'openapi.gateways.yaml#/components/schemas/GatewayPatchRequest'
GatewayPlacementIntent:
$ref: 'openapi.gateways.yaml#/components/schemas/GatewayPlacementIntent'
GatewayPlacementAvailability:
$ref: 'openapi.gateways.yaml#/components/schemas/GatewayPlacementAvailability'
OpenShellGatewayServiceAccountRole:
$ref: 'openapi.serviceAccounts.yaml#/components/schemas/OpenShellGatewayServiceAccountRole'
OpenShellGatewayServiceAccountStatus:
Expand Down
Loading
Loading