-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from pbcccBeatBoard/main
file arrange, dockercompose edit
- Loading branch information
Showing
5 changed files
with
132 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package kr.co.mcmp.manifest; | ||
|
||
import io.kubernetes.client.custom.Quantity; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Getter | ||
@Setter | ||
public class K8SPodDTO { | ||
|
||
public String podName; | ||
public String namespace; | ||
public List<Container> containers; | ||
public Map<String, String> labels; | ||
public String restartPolicy; | ||
|
||
@Getter | ||
@Setter | ||
public class Container{ | ||
public String image; | ||
public String name; | ||
public List<Port> ports; | ||
public Map<String, Quantity> resource; | ||
/*limits: | ||
cpu: 500m | ||
memory: 1Gi | ||
requests: | ||
cpu: 200m | ||
memory: 256Mi*/ | ||
} | ||
|
||
@Getter | ||
@Setter | ||
public class Port{ | ||
public Integer containerPort; | ||
public Integer hostPort; | ||
public String name; | ||
public String protocol; | ||
} | ||
|
||
} |
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
24 changes: 24 additions & 0 deletions
24
src/main/java/kr/co/mcmp/manifest/YamlGenerateService.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 |
---|---|---|
@@ -1,15 +1,39 @@ | ||
package kr.co.mcmp.manifest; | ||
|
||
import io.kubernetes.client.openapi.models.V1Pod; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class YamlGenerateService { | ||
|
||
Logger logger = LoggerFactory.getLogger(YamlGenerateService.class); | ||
|
||
@Autowired | ||
K8SDeployYamlGenerator yamlGen; | ||
|
||
|
||
public String generatePodYaml(K8SPodDTO podContents){ | ||
return yamlGen.getPod(podContents); | ||
} | ||
|
||
public String generateDeploymentYaml(){ | ||
return ""; | ||
} | ||
|
||
public String generateConfigmapYaml(){ | ||
return ""; | ||
} | ||
|
||
public String generateHPAYaml(){ | ||
return ""; | ||
} | ||
|
||
public String generateServiceYaml(){ | ||
return ""; | ||
} | ||
|
||
|
||
} |