-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-12733] Kubernetes overrides in v2 api
Summary: Implemented kubernetes overrides v2 api Test Plan: unit tests Reviewers: sneelakantan, #yba-api-review Reviewed By: sneelakantan, #yba-api-review Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D36636
- Loading branch information
Showing
10 changed files
with
249 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
managed/src/main/java/api/v2/mappers/UniverseEditKubernetesOverridesParamsMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package api.v2.mappers; | ||
|
||
import api.v2.models.UniverseEditKubernetesOverrides; | ||
import com.yugabyte.yw.forms.KubernetesOverridesUpgradeParams; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.MappingTarget; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
@Mapper(config = CentralConfig.class) | ||
public interface UniverseEditKubernetesOverridesParamsMapper { | ||
UniverseEditKubernetesOverridesParamsMapper INSTANCE = | ||
Mappers.getMapper(UniverseEditKubernetesOverridesParamsMapper.class); | ||
|
||
@Mapping(source = "overrides", target = "universeOverrides") | ||
KubernetesOverridesUpgradeParams copyToV1KubernetesOverridesParams( | ||
UniverseEditKubernetesOverrides source, | ||
@MappingTarget KubernetesOverridesUpgradeParams target); | ||
} |
5 changes: 5 additions & 0 deletions
5
...d/src/main/resources/openapi/components/requestBodies/UniverseKubernetesOverridesReq.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/UniverseEditKubernetesOverrides.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
managed/src/main/resources/openapi/components/schemas/UniverseEditKubernetesOverrides.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
title: UniverseEditKubernetesOverrides | ||
description: | | ||
UniverseEditKubernetesOverrides | ||
Update all kubernetes overrides on the universe. Part of UniverseKubernetesOverridesReq | ||
type: object | ||
properties: | ||
overrides: | ||
description: Global kubernetes overrides to apply across the entire universe. | ||
type: string | ||
example: |- | ||
tserver: | ||
podLabels: | ||
env: test | ||
az_overrides: | ||
description: Granular kubernetes overrides per Availability Zone identified by AZ uuid. | ||
example: 'az_uuid: "tserver:\n podLabels:\n env: test"' | ||
additionalProperties: | ||
type: string |
Oops, something went wrong.