Skip to content

Commit

Permalink
Merge pull request #23 from st-yclee/main
Browse files Browse the repository at this point in the history
k8s dto 수정 및 kube-client 버전 수정
  • Loading branch information
st-yclee authored Sep 6, 2024
2 parents 21cb36a + 7c0287b commit 12d4af7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 13 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,9 @@ dependencies {

implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation 'org.apache.commons:commons-compress'
implementation 'io.kubernetes:client-java'
implementation 'io.kubernetes:client-java-api'
implementation 'io.kubernetes:client-java-api'
implementation 'io.kubernetes:client-java-extended'
implementation 'io.kubernetes:client-java:20.0.0'
implementation 'io.kubernetes:client-java-api:20.0.0'
implementation 'io.kubernetes:client-java-extended:20.0.0'


}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public class K8SConfigMapDto {
public static class MetadataDto {
private String name;
private String namespace;
private Map<String, Object> labels = null;
private Map<String, String> labels = null;
}
}
14 changes: 12 additions & 2 deletions src/main/java/kr/co/mcmp/api/manifest/k8s/K8SDeploymentsDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class K8SDeploymentsDto {
public static class MetadataDto {
private String name;
private String namespace;
private Map<String, Object> labels = null;
private Map<String, String> labels = null;
}

@Getter
Expand All @@ -43,7 +43,7 @@ public static class SpecDto {
@NoArgsConstructor
@AllArgsConstructor
public static class SelectorDto {
private Map<String, Object> matchLabels = null;
private Map<String, String> matchLabels = null;
}

@Getter
Expand All @@ -68,8 +68,18 @@ public static class PodSpecDto {
public static class ContainerDto {
private String name;
private String image;
private List<EnvDto> env = null;
private List<PortDto> ports = null;

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class EnvDto {
private String name;
private String value;
}

@Getter
@Builder
@NoArgsConstructor
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/kr/co/mcmp/api/manifest/k8s/K8SHpaDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class K8SHpaDto {
public static class MetadataDto {
private String name;
private String namespace;
private Map<String, Object> labels = null;
private Map<String, String> labels = null;
}

@Getter
Expand Down
16 changes: 13 additions & 3 deletions src/main/java/kr/co/mcmp/api/manifest/k8s/K8SPodDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class K8SPodDto {
public static class MetadataDto {
private String name;
private String namespace;
private Map<String, Object> labels = null;
private Map<String, String> labels = null;
}

@Getter
Expand All @@ -44,9 +44,19 @@ public static class SpecDto {
public static class ContainerDto {
private String name;
private String image;
private List<EnvDto> env = null;
private List<PortDto> ports = null;
private ResourceDto resources;

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class EnvDto {
private String name;
private String value;
}

@Getter
@Builder
@NoArgsConstructor
Expand All @@ -63,8 +73,8 @@ public static class PortDto {
@NoArgsConstructor
@AllArgsConstructor
public static class ResourceDto {
private Map<String, Object> limits = null;
private Map<String, Object> requests = null;
private Map<String, String> limits = null;
private Map<String, String> requests = null;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/kr/co/mcmp/api/manifest/k8s/K8SServiceDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public class K8SServiceDto {
public static class MetadataDto {
private String name;
private String namespace;
private Map<String, Object> labels = null;
private Map<String, String> labels = null;
}

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SpecDto {
private Map<String, Object> selector = null;
private Map<String, String> selector = null;
private List<PortsDto> ports = null;
private String type;

Expand Down

0 comments on commit 12d4af7

Please sign in to comment.