diff --git a/src/main/java/kr/co/mcmp/manifest/K8SConfigmapDTO.java b/src/main/java/kr/co/mcmp/manifest/K8SConfigmapDTO.java new file mode 100644 index 0000000..ce41a1b --- /dev/null +++ b/src/main/java/kr/co/mcmp/manifest/K8SConfigmapDTO.java @@ -0,0 +1,13 @@ +package kr.co.mcmp.manifest; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class K8SConfigmapDTO { + + + + +} diff --git a/src/main/java/kr/co/mcmp/manifest/K8SDeployService.java b/src/main/java/kr/co/mcmp/manifest/K8SDeployService.java index 89ba960..a6b3d46 100644 --- a/src/main/java/kr/co/mcmp/manifest/K8SDeployService.java +++ b/src/main/java/kr/co/mcmp/manifest/K8SDeployService.java @@ -15,12 +15,6 @@ public class K8SDeployService{ @Autowired private K8SDeployYamlGenerator deployYamlGenerator; - - //yaml 미리보기 - public String getK8SDeployYaml(K8SDeployDTO deploy) throws IOException { - String deployYaml = deployYamlGenerator.generateDeployYaml(deploy); - return deployYaml; - } diff --git a/src/main/java/kr/co/mcmp/manifest/K8SDeployYamlGenerator.java b/src/main/java/kr/co/mcmp/manifest/K8SDeployYamlGenerator.java index 8713142..53298a7 100644 --- a/src/main/java/kr/co/mcmp/manifest/K8SDeployYamlGenerator.java +++ b/src/main/java/kr/co/mcmp/manifest/K8SDeployYamlGenerator.java @@ -1,5 +1,6 @@ package kr.co.mcmp.manifest; +import com.google.gson.annotations.SerializedName; import io.kubernetes.client.common.KubernetesObject; import io.kubernetes.client.custom.IntOrString; import io.kubernetes.client.custom.Quantity; @@ -20,7 +21,7 @@ @Component public class K8SDeployYamlGenerator { - public String getPod(K8SPodDTO podDto) { + private V1Pod getPod(K8SPodDTO podDto) { V1Pod pod = new V1Pod(); pod.setApiVersion(K8S.Controller.Pod.getApiVersion()); @@ -32,103 +33,235 @@ public String getPod(K8SPodDTO podDto) { metadata.setLabels(podDto.getLabels()); pod.setMetadata(metadata); - V1PodSpec podSpec = new V1PodSpec(); + V1PodSpec podSpec = getPodSpec(podDto); + pod.setSpec(podSpec); - List dtoContainers = podDto.getContainers(); - - // for in for 바꿔야하나 실제 시간복잡도가 높지 않아 걍 씀 - List containers = new ArrayList<>(); - for(K8SPodDTO.Container cont: dtoContainers){ - V1Container podContainer = new V1Container(); - podContainer.setImage(cont.getImage()); - podContainer.setImage(cont.getName()); - List podPorts = new ArrayList<>(); - for(K8SPodDTO.Port port: cont.getPorts()) { - V1ContainerPort contPort = new V1ContainerPort(); - contPort.setContainerPort(port.getContainerPort()); - contPort.setHostPort(port.getHostPort()); - contPort.setName(port.getName()); - contPort.setProtocol(port.getProtocol()); - podContainer.addPortsItem(contPort); - } - containers.add(podContainer); - } + return pod; + } - podSpec.setContainers(containers); + private V1PodSpec getPodSpec(K8SPodDTO podDto){ + V1PodSpec podSpec = new V1PodSpec(); + List containerList = podDto.getContainers(); + podSpec.setContainers(containerList); podSpec.setRestartPolicy(podDto.getRestartPolicy()); + return podSpec; + } - pod.setSpec(podSpec); + public String getPodYaml(K8SPodDTO podDto) { + V1Pod pod = getPod(podDto); StringBuffer buffer = new StringBuffer(); appendYaml(buffer, pod); String yaml = buffer.toString(); - return yaml; } + private V1Deployment getDeployment(K8SDeploymentDTO deploy) { + V1Deployment deployment = new V1Deployment(); + deployment.setApiVersion("apps/v1"); + deployment.setKind("Deployment"); + V1ObjectMeta metadata = new V1ObjectMeta(); + metadata.setName(deploy.getName()); + metadata.setNamespace(deploy.getNamespace()); + metadata.setLabels(deploy.getLabels()); + deployment.setMetadata(metadata); + // spec + V1DeploymentSpec deploymentSpec = new V1DeploymentSpec(); + deployment.setSpec(deploymentSpec); + // spec.selector + V1LabelSelector labelSelector = new V1LabelSelector(); + labelSelector.setMatchLabels(deploy.getLabels()); + deploymentSpec.setSelector(labelSelector); - public String generateDeployYaml(K8SDeployDTO deploy) { + // spec.replicas + Integer replicas = (deploy.getReplicas() == null || deploy.getReplicas() == 0) ? 1 : deploy.getReplicas(); + deploymentSpec.setReplicas(replicas); - StringBuffer buffer = new StringBuffer(); + // spec.strategy + V1DeploymentStrategy deploymentStrategy = new V1DeploymentStrategy(); + deploymentStrategy.setType("RollingUpdate"); + deploymentSpec.setStrategy(deploymentStrategy); - // defaudlt Label 추가 - Map labels = addDefaultLabel(deploy.getLabels(), deploy.getDeployName()); - deploy.setLabels(labels); - - //pvc 네이밍룰 적용 (kbcard 기준) - setVolumeName(deploy.getName(), deploy.getPvcVolumes()); - if (deploy.getPvcVolumes() != null) { - for (K8SVolume volume : deploy.getPvcVolumes()) { - appendYaml(buffer, getPvc(deploy, volume)); - } + // template(pod) + deploymentSpec.setTemplate(getPodTemplateSpec(deploy)); + return deployment; + } + + + private V1PodTemplateSpec getPodTemplateSpec(K8SDeploymentDTO deploy){ + + V1PodTemplateSpec podTemplateSpec = new V1PodTemplateSpec(); + V1ObjectMeta metadata = new V1ObjectMeta(); + metadata.setLabels(new HashMap(deploy.getLabels())); + podTemplateSpec.setMetadata(metadata); + + K8SPodDTO podDto = deploy.getPodDto(); + V1PodSpec podSpec = getPodSpec(podDto); +/* + // add imagepullsecrets + if (StringUtils.isNotEmpty(deploy.getImagePullSecret())) { + List imagePullSecretsList = new ArrayList(1); + V1LocalObjectReference v1LocalObjectReference = new V1LocalObjectReference(); + v1LocalObjectReference.setName(deploy.getImagePullSecret()); + imagePullSecretsList.add(v1LocalObjectReference); + podSpec.setImagePullSecrets(imagePullSecretsList); } +*/ + podTemplateSpec.setSpec(podSpec); - switch (K8S.Controller.valueOf(deploy.getController())) { - case Deployment: - V1Deployment deployment = getDeployment(deploy); - appendYaml(buffer, deployment); - appendYaml(buffer, getAutoscaler(deploy, deployment)); - break; - case DaemonSet: - appendYaml(buffer, getDaemonSet(deploy)); - break; - case StatefulSet: - appendYaml(buffer, getStatefulSet(deploy)); - break; - case CronJob: - appendYaml(buffer, getCronJob(deploy)); - break; -// case Pod: -// appendYaml(buffer, getPod(deploy)); -// break; + +/* + // template.spec.container.envFrom.configMapRef + if (podDto.getConfigMapData() != null && !podDto.getConfigMapData().isEmpty()) { + V1ConfigMapEnvSource configMapEnvSource = new V1ConfigMapEnvSource(); + configMapEnvSource.setName(getConfigMapName(deploy.getName())); + V1EnvFromSource fromSource = new V1EnvFromSource(); + fromSource.setConfigMapRef(configMapEnvSource); + container.addEnvFromItem(fromSource); + } + + if (deploy.getSecretData() != null && !deploy.getSecretData().isEmpty()) { + V1SecretEnvSource secretEnvSource = new V1SecretEnvSource(); + secretEnvSource.setName(getSecretName(deploy.getName())); + V1EnvFromSource secretFromSource = new V1EnvFromSource(); + secretFromSource.setSecretRef(secretEnvSource); + container.addEnvFromItem(secretFromSource); } +*/ - // service - appendYaml(buffer, getService(deploy)); + // template.spec.container.volumeMounts + setVolumeMounts(podSpec.getContainers().get(0), deploy.getVolumes()); - appendYaml(buffer, getConfigMap(deploy)); - appendYaml(buffer, getSecret(deploy)); + // template.spec.container.resources + //setResource(container, deploy.getResource()); +/* + //startup + V1Probe startupProbe = new V1Probe(); + startupProbe.setInitialDelaySeconds(30); + startupProbe.setPeriodSeconds(10); + V1TCPSocketAction startupSocket = new V1TCPSocketAction(); + startupSocket.setPort(new IntOrString(containerPort)); + startupProbe.setTcpSocket(startupSocket); + + container.setStartupProbe(startupProbe); + + //readiness + V1Probe readinessProbe = new V1Probe(); + readinessProbe.setInitialDelaySeconds(30); + readinessProbe.setPeriodSeconds(10); + V1TCPSocketAction readinessSocket = new V1TCPSocketAction(); + readinessSocket.setPort(new IntOrString(containerPort)); + readinessProbe.setTcpSocket(readinessSocket); + + container.setReadinessProbe(readinessProbe); + + //liveness + V1Probe livenessProbe = new V1Probe(); + livenessProbe.setInitialDelaySeconds(30); livenessProbe.setPeriodSeconds(10); + V1TCPSocketAction livenessSocket = new V1TCPSocketAction(); + livenessSocket.setPort(new IntOrString(containerPort)); + livenessProbe.setTcpSocket(livenessSocket); + + container.setLivenessProbe(livenessProbe); +*/ + // template.spec.volume + //setHostPathVolumes(podSpec, deploy.getHostPathVolumes()); + //setPVCVolumes(podSpec, deploy.getPvcVolumes()); - // httprpoxy - appendYaml(buffer, getTlsSecret(deploy)); + return podTemplateSpec; + } - // ingress kbcard ingress 사용하지 않음 - // appendYaml(buffer, getIngress(deploy)); + public String getDeploymentYaml(K8SDeploymentDTO deploy){ + V1Deployment deployment = getDeployment(deploy); + StringBuffer buffer = new StringBuffer(); + appendYaml(buffer, deployment); String yaml = buffer.toString(); + return yaml; + } - //default Label 삭제 - removeDefaultLabel(deploy.getLabels()); - + + + private V1ConfigMap getConfigmap(K8SConfigmapDTO cmDto){ + return null; + } + + public String getConfigmapYaml(K8SConfigmapDTO cmDto){ + return ""; + } + + + private V1HorizontalPodAutoscaler getHpa(K8SHPADTO hpaDto){ + + V1HorizontalPodAutoscaler hpa = new V1HorizontalPodAutoscaler(); + + hpa.setApiVersion("autoscaling/v2"); + hpa.setKind("HorizontalPodAutoscaler"); + + V1ObjectMeta metadata = new V1ObjectMeta(); + metadata.setName(hpaDto.getHpaName()); + metadata.setNamespace(hpaDto.getNamespace()); + metadata.setLabels(hpaDto.getLabels()); + hpa.setMetadata(metadata); + + V1HorizontalPodAutoscalerSpec spec = new V1HorizontalPodAutoscalerSpec(); + + V1CrossVersionObjectReference ref = new V1CrossVersionObjectReference(); + ref.setApiVersion("apps/v1"); + ref.setKind(hpaDto.getTarget().getKind()); + ref.setName(hpaDto.getTarget().getName()); + spec.setScaleTargetRef(ref); + + spec.setMinReplicas(hpaDto.getMinReplicas()); + spec.setMaxReplicas(hpaDto.getMaxReplicas()); + + V2beta1MetricSpec metrics = new V2beta1MetricSpec(); + metrics.setType(hpaDto.getMetric().getType()); // Resource + V2beta1ResourceMetricSource resource = new V2beta1ResourceMetricSource(); + resource.setName(hpaDto.getMetric().getResourceName()); + resource.setTargetAverageUtilization(hpaDto.getMetric().getTargetAverageUtilization()); + //V2beta2MetricTarget target = new V2beta2MetricTarget(); + //target.setType(hpaDto.getMetric().getTargetType()); + //target.setAverageUtilization(hpaDto.getMetric().getTargetAverageUtilization()); + + metrics.setResource(resource); + + + + return hpa; + } + + public String getHpaYaml(K8SHPADTO hpaDto){ + V1HorizontalPodAutoscaler hpa = getHpa(hpaDto); + StringBuffer buffer = new StringBuffer(); + appendYaml(buffer, hpa); + String yaml = buffer.toString(); return yaml; + } + + private V1Service getSvc(K8SServiceDTO svcDto){ + return null; + } + + public String getSvcYaml(K8SServiceDTO svcDto){ + return ""; + } + + + private V1ObjectMeta getMetadata(String name, String namespace) { + V1ObjectMeta metadata = new V1ObjectMeta(); + metadata.setName(name); + metadata.setNamespace(namespace); + return metadata; } + // public String generateTlsSecret(K8SDeployDTO deploy) { // // StringBuffer buffer = new StringBuffer(); @@ -176,38 +309,7 @@ private void appendYaml(StringBuffer buffer, Object object) { } // Deployment - private V1Deployment getDeployment(K8SDeployDTO deploy) { - V1Deployment deployment = new V1Deployment(); - deployment.setApiVersion(K8S.Controller.Deployment.getApiVersion()); - deployment.setKind(deploy.getController()); - - // metadata - V1ObjectMeta metadata = getControllerMetadata(deploy.getController(), deploy.getName(), deploy.getNamespace(), deploy.getLabels()); - deployment.setMetadata(metadata); - - // spec - V1DeploymentSpec deploymentSpec = new V1DeploymentSpec(); - deployment.setSpec(deploymentSpec); - - // spec.selector - V1LabelSelector labelSelector = new V1LabelSelector(); - labelSelector.setMatchLabels(deploy.getLabels()); - deploymentSpec.setSelector(labelSelector); - - // spec.replicas - Integer replicas = (deploy.getReplicas() == null || deploy.getReplicas() == 0) ? 1 : deploy.getReplicas(); - deploymentSpec.setReplicas(replicas); - - // spec.strategy - V1DeploymentStrategy deploymentStrategy = new V1DeploymentStrategy(); - deploymentStrategy.setType(deploy.getStrategyType()); - deploymentSpec.setStrategy(deploymentStrategy); - - // template(pod) - deploymentSpec.setTemplate(getPodTemplateSpec(deploy)); - return deployment; - } @@ -240,7 +342,7 @@ private V1DaemonSet getDaemonSet(K8SDeployDTO deploy) { daemonSetSpec.setUpdateStrategy(updateStrategy); // template(pod) - daemonSetSpec.setTemplate(getPodTemplateSpec(deploy)); + //daemonSetSpec.setTemplate(getPodTemplateSpec(deploy)); return daemonSet; } @@ -277,7 +379,7 @@ private V1StatefulSet getStatefulSet(K8SDeployDTO deploy) { statefulSetSpec.serviceName(getServiceName(deploy)); // template(pod) - statefulSetSpec.template(getPodTemplateSpec(deploy)); + //statefulSetSpec.template(getPodTemplateSpec(deploy)); // TODO volumeClaimTemplates @@ -285,40 +387,7 @@ private V1StatefulSet getStatefulSet(K8SDeployDTO deploy) { } // CronJob - private V1beta1CronJob getCronJob(K8SDeployDTO deploy) { - - V1beta1CronJob cronJob = new V1beta1CronJob(); - cronJob.setApiVersion(K8S.Controller.CronJob.getApiVersion()); - cronJob.setKind(deploy.getController()); - // metadata - V1ObjectMeta metadata = getControllerMetadata(deploy.getController(), deploy.getName(), deploy.getNamespace(), deploy.getLabels()); - cronJob.setMetadata(metadata); - - // spec - V1beta1CronJobSpec cronJobSpec = new V1beta1CronJobSpec(); - cronJob.setSpec(cronJobSpec); - - // spec. - // cronJobSpec.setConcurrencyPolicy("Forbid"); //Allow, Forbid, Replace - // spec.schedule - cronJobSpec.schedule(deploy.getSchedule()); - - // spec.jobTemplate - V1beta1JobTemplateSpec jobTemplate = new V1beta1JobTemplateSpec(); - cronJobSpec.jobTemplate(jobTemplate); - - // spec.jobTemplate.spec - V1JobSpec spec = new V1JobSpec(); - jobTemplate.setSpec(spec); - - // pod - V1PodTemplateSpec template = getPodTemplateSpec(deploy); - template.getSpec().setRestartPolicy("Never"); - spec.setTemplate(template); - - return cronJob; - } private V1ObjectMeta getControllerMetadata(String controller, String name, String namespace, Map labels) { @@ -337,13 +406,6 @@ private V1ObjectMeta getControllerMetadata(String controller, String name, Strin return metadata; } - private V1ObjectMeta getMetadata(String name, String namespace) { - - V1ObjectMeta metadata = new V1ObjectMeta(); - metadata.setName(name); - metadata.setNamespace(namespace); - return metadata; - } private String getName(String postfix, String name) { return name.replace("KIND", postfix); @@ -363,171 +425,9 @@ private Map addDefaultLabel(Map labels , String private Map removeDefaultLabel(Map labels) { - if (labels != null) { - labels.remove(K8S.podAntiAffinityKey); - } - + if (labels != null) { labels.remove(K8S.podAntiAffinityKey); } return labels; } - - - // PodTemplate - private V1PodTemplateSpec getPodTemplateSpec(K8SDeployDTO deploy) { - - V1PodTemplateSpec podTemplateSpec = new V1PodTemplateSpec(); - // template.metadata - V1ObjectMeta metadata = new V1ObjectMeta(); - metadata.setLabels(new HashMap(deploy.getLabels())); - podTemplateSpec.setMetadata(metadata); - - // template.spec - V1PodSpec podSpec = new V1PodSpec(); - - // add imagepullsecrets - if (StringUtils.isNotEmpty(deploy.getImagePullSecret())) { - List imagePullSecretsList = new ArrayList(1); - V1LocalObjectReference v1LocalObjectReference = new V1LocalObjectReference(); - v1LocalObjectReference.setName(deploy.getImagePullSecret()); - imagePullSecretsList.add(v1LocalObjectReference); - podSpec.setImagePullSecrets(imagePullSecretsList); - } - - podTemplateSpec.setSpec(podSpec); - - // template.spec.container - List containers = new ArrayList(1); - podSpec.setContainers(containers); - - V1Container container = new V1Container(); - containers.add(container); - - // template.spec.container.name - container.setName(getContainerName(deploy.getName())); - // template.spec.container.image - container.setImage("DEPLOY_IMAGE_NAME"); - // template.spec.container.command - if (!isEmpty(deploy.getCommand())) { - container.setCommand(deploy.getCommand()); - } - // template.spec.container.args - if (!isEmpty(deploy.getArgs())) { - container.setArgs(deploy.getArgs()); - } - - // template.spec.container.envFrom.configMapRef - if (deploy.getConfigMapData() != null && !deploy.getConfigMapData().isEmpty()) { - V1ConfigMapEnvSource configMapEnvSource = new V1ConfigMapEnvSource(); - configMapEnvSource.setName(getConfigMapName(deploy.getName())); - V1EnvFromSource fromSource = new V1EnvFromSource(); - fromSource.setConfigMapRef(configMapEnvSource); - container.addEnvFromItem(fromSource); - } - - // template.spec.container.envFrom.secretRef - // https://kubernetes.io/ko/docs/tasks/inject-data-application/distribute-credentials-secure/#%EC%8B%9C%ED%81%AC%EB%A6%BF%EC%9D%98-%EB%AA%A8%EB%93%A0-%ED%82%A4-%EA%B0%92-%EC%8C%8D%EC%9D%84-%EC%BB%A8%ED%85%8C%EC%9D%B4%EB%84%88-%ED%99%98%EA%B2%BD-%EB%B3%80%EC%88%98%EB%A1%9C-%EA%B5%AC%EC%84%B1%ED%95%98%EA%B8%B0 - if (deploy.getSecretData() != null && !deploy.getSecretData().isEmpty()) { - V1SecretEnvSource secretEnvSource = new V1SecretEnvSource(); - secretEnvSource.setName(getSecretName(deploy.getName())); - V1EnvFromSource secretFromSource = new V1EnvFromSource(); - secretFromSource.setSecretRef(secretEnvSource); - container.addEnvFromItem(secretFromSource); - } - - // template.spec.container.ports - if (deploy.getPorts() != null && deploy.getPorts().size() > 0) { - List containerPorts = new ArrayList(); - - for (K8SPort port : deploy.getPorts()) { - V1ContainerPort containerPort = new V1ContainerPort(); - containerPort.setName(port.getName()); - containerPort.setContainerPort(port.getContainerPort()); - containerPorts.add(containerPort); - } - - container.setPorts(containerPorts); - } - - // template.spec.container.volumeMounts - setVolumeMounts(container, deploy.getHostPathVolumes()); - setVolumeMounts(container, deploy.getPvcVolumes()); - setVolumeMounts(container, deploy.getAzureFileVolumes()); - - // template.spec.container.resources - setResource(container, deploy.getResource()); - - // template.spec.container.probe////////////////////////////////////////////////////////// - - // V1HTTPGetAction httpGet = new V1HTTPGetAction(); - // readinessProbe.setHttpGet(httpGet); - - - int containerPort = deploy.getPorts().get(0).getContainerPort(); - - //startup - V1Probe startupProbe = new V1Probe(); - startupProbe.setInitialDelaySeconds(30); - startupProbe.setPeriodSeconds(10); - V1TCPSocketAction startupSocket = new V1TCPSocketAction(); - startupSocket.setPort(new IntOrString(containerPort)); - startupProbe.setTcpSocket(startupSocket); - - container.setStartupProbe(startupProbe); - - //readiness - V1Probe readinessProbe = new V1Probe(); - readinessProbe.setInitialDelaySeconds(30); - readinessProbe.setPeriodSeconds(10); - V1TCPSocketAction readinessSocket = new V1TCPSocketAction(); - readinessSocket.setPort(new IntOrString(containerPort)); - readinessProbe.setTcpSocket(readinessSocket); - - container.setReadinessProbe(readinessProbe); - - //liveness - V1Probe livenessProbe = new V1Probe(); - livenessProbe.setInitialDelaySeconds(30); livenessProbe.setPeriodSeconds(10); - V1TCPSocketAction livenessSocket = new V1TCPSocketAction(); - livenessSocket.setPort(new IntOrString(containerPort)); - livenessProbe.setTcpSocket(livenessSocket); - - container.setLivenessProbe(livenessProbe); - - - // template.spec.container.probe////////////////////////////////////////////////////////// - - // TODO ConfigMap, Secret - - // template.spec.hostname - if (!StringUtils.isEmpty(deploy.getHostname())) { - podSpec.setHostname(deploy.getHostname()); - } - - // template.spec.nodeSelector - Map nodeSelector = getNodeSelector(deploy.getNodeSelector()); - if (nodeSelector != null && nodeSelector.size() > 0) { - podSpec.setNodeSelector(nodeSelector); - } - - // template.spec.volume - setHostPathVolumes(podSpec, deploy.getHostPathVolumes()); - setPVCVolumes(podSpec, deploy.getPvcVolumes()); - //setAzureFileVolumes(podSpec, deploy.getAzureFileVolumes()); - - // template.spec.affinity - switch (K8S.Controller.valueOf(deploy.getController())) { - case Deployment: - case StatefulSet: - case Rollout: - podSpec.setAffinity(getPodAntiAffinity(deploy)); - break; - case DaemonSet: - case CronJob: - break; - } - - return podTemplateSpec; - - } // VolumeMounts private void setVolumeMounts(V1Container container, List volumesList) { @@ -621,24 +521,7 @@ private void setResource(V1Container container, K8SResource resource) { } - // NodeSelector - private Map getNodeSelector(List nodeSelectorList) { - - if (isEmpty(nodeSelectorList)) { - return null; - } - - Map nodeSelectorMap = new HashMap<>(); - for (String nodeSelector : nodeSelectorList) { - if (!nodeSelector.contains(":")) - continue; - String[] array = nodeSelector.split(":"); - nodeSelectorMap.put(array[0].trim(), array[1].trim()); - } - - return nodeSelectorMap; - } private V1Affinity getPodAntiAffinity(K8SDeployDTO deploy) { @@ -675,7 +558,7 @@ private V1ConfigMap getConfigMap(K8SDeployDTO deploy) { configMap.setApiVersion(K8S.Kind.ConfigMap.getApiVersion()); configMap.setKind(K8S.Kind.ConfigMap.name()); - configMap.setMetadata(getMetadata(getConfigMapName(deploy.getName()), deploy.getNamespace())); + //configMap.setMetadata(getMetadata(getConfigMapName(deploy.getName()), deploy.getNamespace())); configMap.setData(deploy.getConfigMapData()); @@ -696,7 +579,7 @@ private V1Secret getSecret(K8SDeployDTO deploy) { secret.setApiVersion(K8S.Kind.Secret.getApiVersion()); secret.setKind(K8S.Kind.Secret.name()); - secret.setMetadata(getMetadata(getSecretName(deploy.getName()), deploy.getNamespace())); + //secret.setMetadata(getMetadata(getSecretName(deploy.getName()), deploy.getNamespace())); for (String key : secretData.keySet()) { secret.putDataItem(key, secretData.get(key).getBytes()); @@ -723,8 +606,8 @@ private V1Secret getTlsSecret(K8SDeployDTO deploy) { secret.setKind(K8S.Kind.Secret.name()); // kbcard 네이밍기준 적용 - String name = getTlsSecretName(deploy.getName()); - secret.setMetadata(getMetadata(name, deploy.getNamespace())); + //String name = getTlsSecretName(deploy.getName()); + //secret.setMetadata(getMetadata(name, deploy.getNamespace())); secret.setType("kubernetes.io/tls"); @@ -743,32 +626,6 @@ private V1Secret getTlsSecret(K8SDeployDTO deploy) { } - - // kbcard 네이밍기준 적용 - private String getContainerName(String deployName) { - String name = getName("pod", deployName); - return String.format("%s-001", name); - } - - // kbcard 네이밍기준 적용 - private String getSecretName(String deployName) { - String name = getName(K8S.Kind.Secret.getPostfix(), deployName); - return String.format("%s-input-001", name); - } - - // kbcard 네이밍기준 적용 - private String getTlsSecretName(String deployName) { - String name = getName(K8S.Kind.Secret.getPostfix(), deployName); - return String.format("%s-httptls-001", name); - } - - // kbcard 네이밍기준 적용 - private String getConfigMapName(String deployName) { - String name = getName(K8S.Kind.ConfigMap.getPostfix(), deployName); - return String.format("%s-input-001", name); - } - - private String getServiceName(K8SDeployDTO deploy) { String name = getName(K8S.Kind.Service.getPostfix(), deploy.getName()); @@ -866,9 +723,6 @@ private V1Service getPreviewService(K8SDeployDTO deploy) { } - private final String KBC_HttpProxy_LoadBalancerPolicy = "Cookie"; - - private V2beta2HorizontalPodAutoscaler getAutoscaler(K8SDeployDTO deploy, KubernetesObject object) { @@ -945,12 +799,6 @@ private void setVolumeName(String deployName, List volumeList) { } } -// private String getPvcName(K8SDeployDTO deploy, K8SVolume volume) { -// String name = getName(K8S.Kind.PersistentVolumeClaim.getPostfix(), deploy.getName()); -// name = String.format("%s-%s", name, volume.getName()); -// return name; -// } - //private final String KBC_AccessMode = "ReadWriteMany"; //private final String KBC_StorageClassName = "tkg-storage-powerstore1000t-nas-001"; private final String KBC_VolumeMode = "Filesystem"; diff --git a/src/main/java/kr/co/mcmp/manifest/K8SDeploymentDTO.java b/src/main/java/kr/co/mcmp/manifest/K8SDeploymentDTO.java new file mode 100644 index 0000000..39c45a8 --- /dev/null +++ b/src/main/java/kr/co/mcmp/manifest/K8SDeploymentDTO.java @@ -0,0 +1,28 @@ +package kr.co.mcmp.manifest; + +import io.kubernetes.client.openapi.models.V1ConfigMap; +import io.kubernetes.client.openapi.models.V1ConfigMapEnvSource; +import io.kubernetes.client.openapi.models.V1Secret; +import kr.co.mcmp.manifest.k8s.K8SVolume; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; +import java.util.Map; + +@Getter +@Setter +public class K8SDeploymentDTO { + + public String name; + public String namespace; + public Integer replicas; + public Map labels; + public K8SPodDTO podDto; + + public V1ConfigMapEnvSource configmap; + public V1Secret secret; + + private List volumes; + +} diff --git a/src/main/java/kr/co/mcmp/manifest/K8SHPADTO.java b/src/main/java/kr/co/mcmp/manifest/K8SHPADTO.java new file mode 100644 index 0000000..ca1f3e3 --- /dev/null +++ b/src/main/java/kr/co/mcmp/manifest/K8SHPADTO.java @@ -0,0 +1,42 @@ +package kr.co.mcmp.manifest; + +import com.google.gson.annotations.SerializedName; +import io.kubernetes.client.openapi.models.*; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; +import java.util.Map; + +@Getter +@Setter +public class K8SHPADTO { + + public String hpaName; + public String namespace; + public Map labels; + + public TargetRef target; + + public int minReplicas; + public int maxReplicas; + + public Metric metric; + + @Getter + @Setter + public class TargetRef{ + public String kind; + public String name; + } + + @Getter + @Setter + public class Metric{ + public String type; + public String resourceName; + public String targetType; + public int targetAverageUtilization; + } + +} diff --git a/src/main/java/kr/co/mcmp/manifest/K8SPodDTO.java b/src/main/java/kr/co/mcmp/manifest/K8SPodDTO.java index b139227..3fc0531 100644 --- a/src/main/java/kr/co/mcmp/manifest/K8SPodDTO.java +++ b/src/main/java/kr/co/mcmp/manifest/K8SPodDTO.java @@ -1,6 +1,8 @@ package kr.co.mcmp.manifest; import io.kubernetes.client.custom.Quantity; +import io.kubernetes.client.openapi.models.V1Container; +import io.kubernetes.client.openapi.models.V1EnvVar; import lombok.Data; import lombok.Getter; import lombok.Setter; @@ -14,32 +16,9 @@ public class K8SPodDTO { public String podName; public String namespace; - public List containers; + public List containers; public Map labels; public String restartPolicy; - @Getter - @Setter - public class Container{ - public String image; - public String name; - public List ports; - public Map 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; - } } diff --git a/src/main/java/kr/co/mcmp/manifest/K8SServiceDTO.java b/src/main/java/kr/co/mcmp/manifest/K8SServiceDTO.java new file mode 100644 index 0000000..bcaddf7 --- /dev/null +++ b/src/main/java/kr/co/mcmp/manifest/K8SServiceDTO.java @@ -0,0 +1,14 @@ +package kr.co.mcmp.manifest; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class K8SServiceDTO { + + + + + +} diff --git a/src/main/java/kr/co/mcmp/manifest/YamlGenerateController.java b/src/main/java/kr/co/mcmp/manifest/YamlGenerateController.java index 3e2d972..924e49a 100644 --- a/src/main/java/kr/co/mcmp/manifest/YamlGenerateController.java +++ b/src/main/java/kr/co/mcmp/manifest/YamlGenerateController.java @@ -18,12 +18,12 @@ public class YamlGenerateController { Logger logger = LoggerFactory.getLogger(YamlGenerateController.class); @Autowired - YamlGenerateService yamlGenerateService; + YamlGenerateService yamlGenSvc; @Operation(summary = "yaml generate for pod") @PostMapping("/pod") - public String generatePodYaml(K8SDeployDTO k8sDto){ - return null; + public String generatePodYaml(K8SPodDTO k8sPodDto){ + return yamlGenSvc.generatePodYaml(k8sPodDto); } @Operation(summary = "yaml generate for deployment") @@ -46,8 +46,8 @@ public String generateConfigmapYaml(K8SDeployDTO k8sDto){ @Operation(summary = "yaml generate for HPA") @PostMapping("/hpa") - public String generateHPAYaml(K8SDeployDTO k8sDto){ - return null; + public String generateHPAYaml(K8SHPADTO hpaDto){ + return yamlGenSvc.generateHPAYaml(hpaDto); } diff --git a/src/main/java/kr/co/mcmp/manifest/YamlGenerateService.java b/src/main/java/kr/co/mcmp/manifest/YamlGenerateService.java index 26f935e..ce98e65 100644 --- a/src/main/java/kr/co/mcmp/manifest/YamlGenerateService.java +++ b/src/main/java/kr/co/mcmp/manifest/YamlGenerateService.java @@ -16,19 +16,19 @@ public class YamlGenerateService { public String generatePodYaml(K8SPodDTO podContents){ - return yamlGen.getPod(podContents); + return yamlGen.getPodYaml(podContents); } - public String generateDeploymentYaml(){ - return ""; + public String generateDeploymentYaml(K8SDeploymentDTO deploy){ + return yamlGen.getDeploymentYaml(deploy); } public String generateConfigmapYaml(){ return ""; } - public String generateHPAYaml(){ - return ""; + public String generateHPAYaml(K8SHPADTO hpaDto){ + return yamlGen.getHpaYaml(hpaDto); } public String generateServiceYaml(){ diff --git a/swagger.json b/swagger.json index 36b8ba5..06a1d81 100644 --- a/swagger.json +++ b/swagger.json @@ -14,6 +14,10 @@ "host": "localhost:18084", "basePath": "/", "tags": [ + { + "name": "common-component-controller", + "description": "Common Component Controller" + }, { "name": "common-repository-controller", "description": "Common Repository Controller" @@ -42,6 +46,10 @@ "name": "swagger-welcome-web-mvc", "description": "Swagger Welcome Web Mvc" }, + { + "name": "basic-error-controller", + "description": "Basic Error Controller" + }, { "name": "yaml-generate-controller", "description": "Yaml Generate Controller" @@ -82,6 +90,15 @@ "produces": [ "*/*" ], + "parameters": [ + { + "name": "title", + "in": "query", + "description": "title", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "OK", @@ -132,7 +149,7 @@ "format": "int32" }, { - "name": "catalogRefData[0].refernectIdx", + "name": "catalogRefData[0].referncetIdx", "in": "query", "required": false, "type": "integer", @@ -244,7 +261,7 @@ "format": "int32" }, { - "name": "catalogRefData[0].refernectIdx", + "name": "catalogRefData[0].referncetIdx", "in": "query", "required": false, "type": "integer", @@ -436,7 +453,7 @@ "format": "int32" }, { - "name": "refernectIdx", + "name": "referncetIdx", "in": "query", "required": false, "type": "integer", @@ -617,34 +634,24 @@ } } }, - "/manifest/download/{manifestIdx}": { + "/error": { "get": { "tags": [ - "manifest-controller" + "basic-error-controller" ], - "summary": "saveManifest", - "operationId": "saveManifestUsingGET", + "summary": "errorHtml", + "operationId": "errorHtmlUsingGET", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "manifestIdx", - "in": "path", - "description": "manifestIdx", - "required": true, - "type": "integer", - "format": "int32" - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ModelAndView" } }, "401": { @@ -657,120 +664,92 @@ "description": "Not Found" } } - } - }, - "/manifest/{manifestIdx}": { - "get": { + }, + "head": { "tags": [ - "manifest-controller" + "basic-error-controller" ], - "summary": "getManifestDetail", - "operationId": "getManifestDetailUsingGET", + "summary": "errorHtml", + "operationId": "errorHtmlUsingHEAD", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "manifestIdx", - "in": "path", - "description": "manifestIdx", - "required": true, - "type": "integer", - "format": "int32" - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ManifestDTO" + "$ref": "#/definitions/ModelAndView" } }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } }, - "delete": { + "post": { "tags": [ - "manifest-controller" + "basic-error-controller" ], - "summary": "updateManifest", - "operationId": "updateManifestUsingDELETE", + "summary": "errorHtml", + "operationId": "errorHtmlUsingPOST", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "manifestIdx", - "in": "path", - "description": "manifestIdx", - "required": true, - "type": "integer", - "format": "int32" - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ModelAndView" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, - "204": { - "description": "No Content" - }, "403": { "description": "Forbidden" + }, + "404": { + "description": "Not Found" } } - } - }, - "/manifest/{manifestIdx}/txt": { - "get": { + }, + "put": { "tags": [ - "manifest-controller" + "basic-error-controller" ], - "summary": "getManifestDetailTxt", - "operationId": "getManifestDetailTxtUsingGET", + "summary": "errorHtml", + "operationId": "errorHtmlUsingPUT", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "manifestIdx", - "in": "path", - "description": "manifestIdx", - "required": true, - "type": "integer", - "format": "int32" - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/ModelAndView" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -781,162 +760,105 @@ "description": "Not Found" } } - } - }, - "/oss": { - "post": { + }, + "delete": { "tags": [ - "oss-controller" + "basic-error-controller" ], - "summary": "registOss", - "operationId": "registOssUsingPOST", + "summary": "errorHtml", + "operationId": "errorHtmlUsingDELETE", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "in": "body", - "name": "ossDto", - "description": "ossDto", - "required": true, - "schema": { - "$ref": "#/definitions/OssDto" - } - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«long»" + "$ref": "#/definitions/ModelAndView" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } - } - }, - "/oss/connection-check": { - "post": { + }, + "options": { "tags": [ - "oss-controller" + "basic-error-controller" ], - "summary": "checkConnection", - "operationId": "checkConnectionUsingPOST", + "summary": "errorHtml", + "operationId": "errorHtmlUsingOPTIONS", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "in": "body", - "name": "ossDto", - "description": "ossDto", - "required": true, - "schema": { - "$ref": "#/definitions/OssDto" - } - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«boolean»" + "$ref": "#/definitions/ModelAndView" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } - } - }, - "/oss/duplicate": { - "get": { + }, + "patch": { "tags": [ - "oss-controller" + "basic-error-controller" ], - "summary": "isOssInfoDuplicated", - "operationId": "isOssInfoDuplicatedUsingGET", + "summary": "errorHtml", + "operationId": "errorHtmlUsingPATCH", "consumes": [ "application/json" ], "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "ossName", - "in": "query", - "description": "ossName", - "required": true, - "type": "string" - }, - { - "name": "ossUrl", - "in": "query", - "description": "ossUrl", - "required": true, - "type": "string" - }, - { - "name": "ossUsername", - "in": "query", - "description": "ossUsername", - "required": true, - "type": "string" - } + "text/html" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«boolean»" + "$ref": "#/definitions/ModelAndView" } }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } } }, - "/oss/list": { + "/manifest/": { "get": { "tags": [ - "oss-controller" + "manifest-controller" ], - "summary": "getOssList", - "operationId": "getOssListUsingGET_1", + "summary": "getManifest", + "operationId": "getManifestUsingGET", "consumes": [ "application/json" ], @@ -947,7 +869,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«List«OssDto»»" + "type": "array", + "items": { + "$ref": "#/definitions/ManifestDTO" + } } }, "401": { @@ -960,15 +885,13 @@ "description": "Not Found" } } - } - }, - "/oss/list/{ossTypeName}": { - "get": { + }, + "post": { "tags": [ - "oss-controller" + "manifest-controller" ], - "summary": "getOssList", - "operationId": "getOssListUsingGET", + "summary": "createManifest", + "operationId": "createManifestUsingPOST", "consumes": [ "application/json" ], @@ -977,10 +900,34 @@ ], "parameters": [ { - "name": "ossTypeName", - "in": "path", - "description": "ossTypeName", - "required": true, + "name": "manifestIdx", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "manifestTitle", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "manifestContent", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "manifestType", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "manifestCategory", + "in": "query", + "required": false, "type": "string" } ], @@ -988,9 +935,12 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«List«OssDto»»" + "$ref": "#/definitions/ManifestDTO" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -1001,15 +951,13 @@ "description": "Not Found" } } - } - }, - "/oss/v1/repositories/{module}/create": { - "post": { + }, + "put": { "tags": [ - "common-repository-controller" + "manifest-controller" ], - "summary": "createRepository", - "operationId": "createRepositoryUsingPOST", + "summary": "updateManifest", + "operationId": "updateManifestUsingPUT", "consumes": [ "application/json" ], @@ -1018,27 +966,42 @@ ], "parameters": [ { - "name": "module", - "in": "path", - "description": "module", - "required": true, + "name": "manifestIdx", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "manifestTitle", + "in": "query", + "required": false, "type": "string" }, { - "in": "body", - "name": "repositoryDto", - "description": "repositoryDto", - "required": true, - "schema": { - "$ref": "#/definitions/RepositoryDto" - } + "name": "manifestContent", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "manifestType", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "manifestCategory", + "in": "query", + "required": false, + "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«string»" + "$ref": "#/definitions/ManifestDTO" } }, "201": { @@ -1056,13 +1019,13 @@ } } }, - "/oss/v1/repositories/{module}/delete/{name}": { - "delete": { + "/manifest/download/{manifestIdx}": { + "get": { "tags": [ - "common-repository-controller" + "manifest-controller" ], - "summary": "deleteRepository", - "operationId": "deleteRepositoryUsingDELETE", + "summary": "saveManifest", + "operationId": "saveManifestUsingGET", "consumes": [ "application/json" ], @@ -1071,46 +1034,40 @@ ], "parameters": [ { - "name": "module", - "in": "path", - "description": "module", - "required": true, - "type": "string" - }, - { - "name": "name", + "name": "manifestIdx", "in": "path", - "description": "name", + "description": "manifestIdx", "required": true, - "type": "string" + "type": "integer", + "format": "int32" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«string»" + "type": "boolean" } }, "401": { "description": "Unauthorized" }, - "204": { - "description": "No Content" - }, "403": { "description": "Forbidden" + }, + "404": { + "description": "Not Found" } } } }, - "/oss/v1/repositories/{module}/detail/{name}": { + "/manifest/{manifestIdx}": { "get": { "tags": [ - "common-repository-controller" + "manifest-controller" ], - "summary": "getRepositoryDetailByName", - "operationId": "getRepositoryDetailByNameUsingGET", + "summary": "getManifestDetail", + "operationId": "getManifestDetailUsingGET", "consumes": [ "application/json" ], @@ -1119,25 +1076,19 @@ ], "parameters": [ { - "name": "module", - "in": "path", - "description": "module", - "required": true, - "type": "string" - }, - { - "name": "name", + "name": "manifestIdx", "in": "path", - "description": "name", + "description": "manifestIdx", "required": true, - "type": "string" + "type": "integer", + "format": "int32" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«RepositoryDto»" + "$ref": "#/definitions/ManifestDTO" } }, "401": { @@ -1150,15 +1101,13 @@ "description": "Not Found" } } - } - }, - "/oss/v1/repositories/{module}/list": { - "get": { + }, + "delete": { "tags": [ - "common-repository-controller" + "manifest-controller" ], - "summary": "getRepositoryList", - "operationId": "getRepositoryListUsingGET", + "summary": "updateManifest", + "operationId": "updateManifestUsingDELETE", "consumes": [ "application/json" ], @@ -1167,39 +1116,40 @@ ], "parameters": [ { - "name": "module", + "name": "manifestIdx", "in": "path", - "description": "module", + "description": "manifestIdx", "required": true, - "type": "string" + "type": "integer", + "format": "int32" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«List«RepositoryDto»»" + "type": "boolean" } }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } } }, - "/oss/v1/repositories/{module}/update": { - "put": { + "/manifest/{manifestIdx}/txt": { + "get": { "tags": [ - "common-repository-controller" + "manifest-controller" ], - "summary": "updateRepository", - "operationId": "updateRepositoryUsingPUT", + "summary": "getManifestDetailTxt", + "operationId": "getManifestDetailTxtUsingGET", "consumes": [ "application/json" ], @@ -1208,32 +1158,21 @@ ], "parameters": [ { - "name": "module", + "name": "manifestIdx", "in": "path", - "description": "module", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "repositoryDto", - "description": "repositoryDto", + "description": "manifestIdx", "required": true, - "schema": { - "$ref": "#/definitions/RepositoryDto" - } + "type": "integer", + "format": "int32" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«string»" + "type": "string" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, @@ -1246,13 +1185,13 @@ } } }, - "/oss/{ossIdx}": { - "get": { + "/oss": { + "post": { "tags": [ "oss-controller" ], - "summary": "detailOss", - "operationId": "detailOssUsingGET", + "summary": "registOss", + "operationId": "registOssUsingPOST", "consumes": [ "application/json" ], @@ -1261,21 +1200,25 @@ ], "parameters": [ { - "name": "ossIdx", - "in": "path", - "description": "ossIdx", + "in": "body", + "name": "ossDto", + "description": "ossDto", "required": true, - "type": "integer", - "format": "int64" + "schema": { + "$ref": "#/definitions/OssDto" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«OssDto»" + "$ref": "#/definitions/ResponseWrapper«long»" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -1286,13 +1229,15 @@ "description": "Not Found" } } - }, - "delete": { + } + }, + "/oss/connection-check": { + "post": { "tags": [ "oss-controller" ], - "summary": "deleteOss", - "operationId": "deleteOssUsingDELETE", + "summary": "checkConnection", + "operationId": "checkConnectionUsingPOST", "consumes": [ "application/json" ], @@ -1301,12 +1246,13 @@ ], "parameters": [ { - "name": "ossIdx", - "in": "path", - "description": "ossIdx", + "in": "body", + "name": "ossDto", + "description": "ossDto", "required": true, - "type": "integer", - "format": "int64" + "schema": { + "$ref": "#/definitions/OssDto" + } } ], "responses": { @@ -1316,23 +1262,28 @@ "$ref": "#/definitions/ResponseWrapper«boolean»" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, - "204": { - "description": "No Content" - }, "403": { "description": "Forbidden" + }, + "404": { + "description": "Not Found" } } - }, - "patch": { + } + }, + "/oss/duplicate": { + "get": { "tags": [ "oss-controller" ], - "summary": "updateOss", - "operationId": "updateOssUsingPATCH", + "summary": "isOssInfoDuplicated", + "operationId": "isOssInfoDuplicatedUsingGET", "consumes": [ "application/json" ], @@ -1341,76 +1292,66 @@ ], "parameters": [ { - "name": "ossIdx", - "in": "path", - "description": "ossIdx", + "name": "ossName", + "in": "query", + "description": "ossName", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { - "in": "body", - "name": "ossDto", - "description": "ossDto", + "name": "ossUrl", + "in": "query", + "description": "ossUrl", "required": true, - "schema": { - "$ref": "#/definitions/OssDto" - } + "type": "string" + }, + { + "name": "ossUsername", + "in": "query", + "description": "ossUsername", + "required": true, + "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«long»" + "$ref": "#/definitions/ResponseWrapper«boolean»" } }, "401": { "description": "Unauthorized" }, - "204": { - "description": "No Content" - }, "403": { "description": "Forbidden" - } + }, + "404": { + "description": "Not Found" + } } } }, - "/ossType": { - "post": { + "/oss/list": { + "get": { "tags": [ - "oss-type-controller" + "oss-controller" ], - "summary": "registOssType", - "operationId": "registOssTypeUsingPOST", + "summary": "getOssList", + "operationId": "getOssListUsingGET_1", "consumes": [ "application/json" ], "produces": [ "*/*" ], - "parameters": [ - { - "in": "body", - "name": "ossTypeDto", - "description": "ossTypeDto", - "required": true, - "schema": { - "$ref": "#/definitions/OssTypeDto" - } - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«long»" + "$ref": "#/definitions/ResponseWrapper«List«OssDto»»" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, @@ -1423,24 +1364,33 @@ } } }, - "/ossType/list": { + "/oss/list/{ossTypeName}": { "get": { "tags": [ - "oss-type-controller" + "oss-controller" ], - "summary": "getOssTypeList", - "operationId": "getOssTypeListUsingGET", + "summary": "getOssList", + "operationId": "getOssListUsingGET", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "ossTypeName", + "in": "path", + "description": "ossTypeName", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«List«OssTypeDto»»" + "$ref": "#/definitions/ResponseWrapper«List«OssDto»»" } }, "401": { @@ -1455,13 +1405,13 @@ } } }, - "/ossType/{ossTypeIdx}": { - "get": { + "/oss/v1/components/{module}/create/{name}": { + "post": { "tags": [ - "oss-type-controller" + "common-component-controller" ], - "summary": "detailOssType", - "operationId": "detailOssTypeUsingGET", + "summary": "createComponent", + "operationId": "createComponentUsingPOST", "consumes": [ "application/json" ], @@ -1470,21 +1420,48 @@ ], "parameters": [ { - "name": "ossTypeIdx", + "name": "module", "in": "path", - "description": "ossTypeIdx", + "description": "module", "required": true, - "type": "integer", - "format": "int64" + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "name", + "required": true, + "type": "string" + }, + { + "name": "directory", + "in": "formData", + "description": "directory", + "required": true, + "type": "string" + }, + { + "name": "files", + "in": "formData", + "description": "files", + "required": false, + "type": "array", + "items": { + "type": "file" + }, + "collectionFormat": "multi" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«OssTypeDto»" + "$ref": "#/definitions/ResponseWrapper«string»" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -1495,13 +1472,15 @@ "description": "Not Found" } } - }, - "delete": { + } + }, + "/oss/v1/components/{module}/create/{name}/text": { + "post": { "tags": [ - "oss-type-controller" + "common-component-controller" ], - "summary": "deleteOssType", - "operationId": "deleteOssTypeUsingDELETE", + "summary": "createComponentByText", + "operationId": "createComponentByTextUsingPOST", "consumes": [ "application/json" ], @@ -1510,38 +1489,58 @@ ], "parameters": [ { - "name": "ossTypeIdx", + "name": "module", "in": "path", - "description": "ossTypeIdx", + "description": "module", "required": true, - "type": "integer", - "format": "int64" + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "name", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "textComponent", + "description": "textComponent", + "required": true, + "schema": { + "$ref": "#/definitions/TextComponentDto" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«boolean»" + "$ref": "#/definitions/ResponseWrapper«string»" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, - "204": { - "description": "No Content" - }, "403": { "description": "Forbidden" + }, + "404": { + "description": "Not Found" } } - }, - "patch": { + } + }, + "/oss/v1/components/{module}/delete/{id}": { + "delete": { "tags": [ - "oss-type-controller" + "common-component-controller" ], - "summary": "updateOssType", - "operationId": "updateOssTypeUsingPATCH", + "summary": "deleteComponent", + "operationId": "deleteComponentUsingDELETE", "consumes": [ "application/json" ], @@ -1550,28 +1549,25 @@ ], "parameters": [ { - "name": "ossTypeIdx", + "name": "module", "in": "path", - "description": "ossTypeIdx", + "description": "module", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { - "in": "body", - "name": "ossTypeDto", - "description": "ossTypeDto", + "name": "id", + "in": "path", + "description": "id", "required": true, - "schema": { - "$ref": "#/definitions/OssTypeDto" - } + "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«long»" + "$ref": "#/definitions/ResponseWrapper«string»" } }, "401": { @@ -1586,24 +1582,40 @@ } } }, - "/repository/": { + "/oss/v1/components/{module}/detail/{id}": { "get": { "tags": [ - "repository-controller" + "common-component-controller" ], - "summary": "getRepositoryList", - "operationId": "getRepositoryListUsingGET_1", + "summary": "getComponentDetailByName", + "operationId": "getComponentDetailByNameUsingGET", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "module", + "in": "path", + "description": "module", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "id", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ResponseWrapper«ComponentDto»" } }, "401": { @@ -1616,29 +1628,44 @@ "description": "Not Found" } } - }, - "post": { + } + }, + "/oss/v1/components/{module}/list/{name}": { + "get": { "tags": [ - "repository-controller" + "common-component-controller" ], - "summary": "createRepository", - "operationId": "createRepositoryUsingPOST_1", + "summary": "getComponentList", + "operationId": "getComponentListUsingGET", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "module", + "in": "path", + "description": "module", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "name", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ResponseWrapper«List«ComponentDto»»" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, @@ -1649,24 +1676,44 @@ "description": "Not Found" } } - }, - "put": { + } + }, + "/oss/v1/repositories/{module}/create": { + "post": { "tags": [ - "repository-controller" + "common-repository-controller" ], - "summary": "updateRepository", - "operationId": "updateRepositoryUsingPUT_1", + "summary": "createRepository", + "operationId": "createRepositoryUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "module", + "in": "path", + "description": "module", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "repositoryDto", + "description": "repositoryDto", + "required": true, + "schema": { + "$ref": "#/definitions/RepositoryDto" + } + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ResponseWrapper«string»" } }, "201": { @@ -1682,24 +1729,42 @@ "description": "Not Found" } } - }, + } + }, + "/oss/v1/repositories/{module}/delete/{name}": { "delete": { "tags": [ - "repository-controller" + "common-repository-controller" ], "summary": "deleteRepository", - "operationId": "deleteRepositoryUsingDELETE_1", + "operationId": "deleteRepositoryUsingDELETE", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "module", + "in": "path", + "description": "module", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "name", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ResponseWrapper«string»" } }, "401": { @@ -1714,30 +1779,42 @@ } } }, - "/repository/file/": { - "post": { + "/oss/v1/repositories/{module}/detail/{name}": { + "get": { "tags": [ - "repository-file-controller" + "common-repository-controller" ], - "summary": "file upload", - "description": "file upload", - "operationId": "uploadFilesUsingPOST", + "summary": "getRepositoryDetailByName", + "operationId": "getRepositoryDetailByNameUsingGET", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "module", + "in": "path", + "description": "module", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "name", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/ResponseWrapper«RepositoryDto»" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, @@ -1750,13 +1827,13 @@ } } }, - "/repository/file/{filename}": { + "/oss/v1/repositories/{module}/list": { "get": { "tags": [ - "repository-file-controller" + "common-repository-controller" ], - "summary": "getRepositoryFile", - "operationId": "getRepositoryFileUsingGET", + "summary": "getRepositoryList", + "operationId": "getRepositoryListUsingGET", "consumes": [ "application/json" ], @@ -1765,9 +1842,9 @@ ], "parameters": [ { - "name": "filename", + "name": "module", "in": "path", - "description": "filename", + "description": "module", "required": true, "type": "string" } @@ -1776,7 +1853,7 @@ "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/ResponseWrapper«List«RepositoryDto»»" } }, "401": { @@ -1789,13 +1866,15 @@ "description": "Not Found" } } - }, - "delete": { + } + }, + "/oss/v1/repositories/{module}/update": { + "put": { "tags": [ - "repository-file-controller" + "common-repository-controller" ], - "summary": "deleteRepositoryFile", - "operationId": "deleteRepositoryFileUsingDELETE", + "summary": "updateRepository", + "operationId": "updateRepositoryUsingPUT", "consumes": [ "application/json" ], @@ -1804,39 +1883,51 @@ ], "parameters": [ { - "name": "filename", + "name": "module", "in": "path", - "description": "filename", + "description": "module", "required": true, "type": "string" + }, + { + "in": "body", + "name": "repositoryDto", + "description": "repositoryDto", + "required": true, + "schema": { + "$ref": "#/definitions/RepositoryDto" + } } ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/ResponseWrapper«string»" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, - "204": { - "description": "No Content" - }, "403": { "description": "Forbidden" + }, + "404": { + "description": "Not Found" } } } }, - "/repository/{repositoryName}": { + "/oss/{ossIdx}": { "get": { "tags": [ - "repository-controller" + "oss-controller" ], - "summary": "getRepository", - "operationId": "getRepositoryUsingGET", + "summary": "detailOss", + "operationId": "detailOssUsingGET", "consumes": [ "application/json" ], @@ -1845,18 +1936,19 @@ ], "parameters": [ { - "name": "repositoryName", + "name": "ossIdx", "in": "path", - "description": "repositoryName", + "description": "ossIdx", "required": true, - "type": "string" + "type": "integer", + "format": "int64" } ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ResponseWrapper«OssDto»" } }, "401": { @@ -1870,47 +1962,52 @@ } } }, - "post": { + "delete": { "tags": [ - "repository-controller" + "oss-controller" ], - "summary": "insertRepository", - "operationId": "insertRepositoryUsingPOST", + "summary": "deleteOss", + "operationId": "deleteOssUsingDELETE", "consumes": [ "application/json" ], "produces": [ "*/*" ], + "parameters": [ + { + "name": "ossIdx", + "in": "path", + "description": "ossIdx", + "required": true, + "type": "integer", + "format": "int64" + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "boolean" + "$ref": "#/definitions/ResponseWrapper«boolean»" } }, - "201": { - "description": "Created" - }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } - } - }, - "/search/artifacthub/{keyword}": { - "get": { + }, + "patch": { "tags": [ - "external-repo-controller" + "oss-controller" ], - "summary": "getArtifactHubList", - "operationId": "getArtifactHubListUsingGET", + "summary": "updateOss", + "operationId": "updateOssUsingPATCH", "consumes": [ "application/json" ], @@ -1919,39 +2016,49 @@ ], "parameters": [ { - "name": "keyword", + "name": "ossIdx", "in": "path", - "description": "keyword", + "description": "ossIdx", "required": true, - "type": "string" + "type": "integer", + "format": "int64" + }, + { + "in": "body", + "name": "ossDto", + "description": "ossDto", + "required": true, + "schema": { + "$ref": "#/definitions/OssDto" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«ArtifactHubPackage»" + "$ref": "#/definitions/ResponseWrapper«long»" } }, "401": { "description": "Unauthorized" }, + "204": { + "description": "No Content" + }, "403": { "description": "Forbidden" - }, - "404": { - "description": "Not Found" } } } }, - "/search/dockerhub/{keyword}": { - "get": { + "/ossType": { + "post": { "tags": [ - "external-repo-controller" + "oss-type-controller" ], - "summary": "getDockerHubList", - "operationId": "getDockerHubListUsingGET", + "summary": "registOssType", + "operationId": "registOssTypeUsingPOST", "consumes": [ "application/json" ], @@ -1960,20 +2067,25 @@ ], "parameters": [ { - "name": "keyword", - "in": "path", - "description": "keyword", + "in": "body", + "name": "ossTypeDto", + "description": "ossTypeDto", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/OssTypeDto" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResponseWrapper«DockerHubCatalog»" + "$ref": "#/definitions/ResponseWrapper«long»" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -1986,13 +2098,13 @@ } } }, - "/swagger-ui.html": { + "/ossType/list": { "get": { "tags": [ - "swagger-welcome-web-mvc" + "oss-type-controller" ], - "summary": "redirectToUi", - "operationId": "redirectToUiUsingGET", + "summary": "getOssTypeList", + "operationId": "getOssTypeListUsingGET", "consumes": [ "application/json" ], @@ -2001,7 +2113,10 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/ResponseWrapper«List«OssTypeDto»»" + } }, "401": { "description": "Unauthorized" @@ -2015,35 +2130,34 @@ } } }, - "/v3/api-docs": { + "/ossType/{ossTypeIdx}": { "get": { "tags": [ - "open-api-web-mvc-resource" + "oss-type-controller" ], - "summary": "openapiJson", - "operationId": "openapiJsonUsingGET", + "summary": "detailOssType", + "operationId": "detailOssTypeUsingGET", "consumes": [ "application/json" ], "produces": [ - "application/json" + "*/*" ], "parameters": [ { - "in": "body", - "name": "apiDocsUrl", - "description": "apiDocsUrl", - "required": false, - "schema": { - "type": "string" - } + "name": "ossTypeIdx", + "in": "path", + "description": "ossTypeIdx", + "required": true, + "type": "integer", + "format": "int64" } ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/ResponseWrapper«OssTypeDto»" } }, "401": { @@ -2056,71 +2170,1156 @@ "description": "Not Found" } } - } - }, - "/v3/api-docs.yaml": { - "get": { + }, + "delete": { "tags": [ - "open-api-web-mvc-resource" + "oss-type-controller" ], - "summary": "openapiYaml", - "operationId": "openapiYamlUsingGET", + "summary": "deleteOssType", + "operationId": "deleteOssTypeUsingDELETE", "consumes": [ "application/json" ], "produces": [ - "application/vnd.oai.openapi" + "*/*" ], "parameters": [ { - "in": "body", - "name": "apiDocsUrl", - "description": "apiDocsUrl", - "required": false, - "schema": { - "type": "string" - } + "name": "ossTypeIdx", + "in": "path", + "description": "ossTypeIdx", + "required": true, + "type": "integer", + "format": "int64" } ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/ResponseWrapper«boolean»" } }, "401": { "description": "Unauthorized" }, - "403": { - "description": "Forbidden" + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden" + } + } + }, + "patch": { + "tags": [ + "oss-type-controller" + ], + "summary": "updateOssType", + "operationId": "updateOssTypeUsingPATCH", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "ossTypeIdx", + "in": "path", + "description": "ossTypeIdx", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "body", + "name": "ossTypeDto", + "description": "ossTypeDto", + "required": true, + "schema": { + "$ref": "#/definitions/OssTypeDto" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ResponseWrapper«long»" + } + }, + "401": { + "description": "Unauthorized" + }, + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/repository/": { + "get": { + "tags": [ + "repository-controller" + ], + "summary": "getRepositoryList", + "operationId": "getRepositoryListUsingGET_1", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + }, + "post": { + "tags": [ + "repository-controller" + ], + "summary": "createRepository", + "operationId": "createRepositoryUsingPOST_1", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + }, + "put": { + "tags": [ + "repository-controller" + ], + "summary": "updateRepository", + "operationId": "updateRepositoryUsingPUT_1", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" }, "404": { "description": "Not Found" } } + }, + "delete": { + "tags": [ + "repository-controller" + ], + "summary": "deleteRepository", + "operationId": "deleteRepositoryUsingDELETE_1", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + }, + "401": { + "description": "Unauthorized" + }, + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden" + } + } } }, - "/v3/api-docs/swagger-config": { - "get": { + "/repository/file/": { + "post": { "tags": [ - "swagger-config-resource" + "repository-file-controller" ], - "summary": "openapiJson", - "operationId": "openapiJsonUsingGET_1", + "summary": "file upload", + "description": "file upload", + "operationId": "uploadFilesUsingPOST", "consumes": [ "application/json" ], "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/repository/file/{filename}": { + "get": { + "tags": [ + "repository-file-controller" + ], + "summary": "getRepositoryFile", + "operationId": "getRepositoryFileUsingGET", + "consumes": [ "application/json" ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "filename", + "in": "path", + "description": "filename", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + }, + "delete": { + "tags": [ + "repository-file-controller" + ], + "summary": "deleteRepositoryFile", + "operationId": "deleteRepositoryFileUsingDELETE", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "filename", + "in": "path", + "description": "filename", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/repository/{repositoryName}": { + "get": { + "tags": [ + "repository-controller" + ], + "summary": "getRepository", + "operationId": "getRepositoryUsingGET", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "repositoryName", + "in": "path", + "description": "repositoryName", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + }, + "post": { + "tags": [ + "repository-controller" + ], + "summary": "insertRepository", + "operationId": "insertRepositoryUsingPOST", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/search/artifacthub/{keyword}": { + "get": { + "tags": [ + "external-repo-controller" + ], + "summary": "getArtifactHubList", + "operationId": "getArtifactHubListUsingGET", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "keyword", + "in": "path", + "description": "keyword", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ResponseWrapper«ArtifactHubPackage»" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/search/dockerhub/{keyword}": { + "get": { + "tags": [ + "external-repo-controller" + ], + "summary": "getDockerHubList", + "operationId": "getDockerHubListUsingGET", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "keyword", + "in": "path", + "description": "keyword", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ResponseWrapper«DockerHubCatalog»" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/swagger-ui.html": { + "get": { + "tags": [ + "swagger-welcome-web-mvc" + ], + "summary": "redirectToUi", + "operationId": "redirectToUiUsingGET", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/v3/api-docs": { + "get": { + "tags": [ + "open-api-web-mvc-resource" + ], + "summary": "openapiJson", + "operationId": "openapiJsonUsingGET", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "apiDocsUrl", + "description": "apiDocsUrl", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/v3/api-docs.yaml": { + "get": { + "tags": [ + "open-api-web-mvc-resource" + ], + "summary": "openapiYaml", + "operationId": "openapiYamlUsingGET", + "consumes": [ + "application/json" + ], + "produces": [ + "application/vnd.oai.openapi" + ], + "parameters": [ + { + "in": "body", + "name": "apiDocsUrl", + "description": "apiDocsUrl", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/v3/api-docs/swagger-config": { + "get": { + "tags": [ + "swagger-config-resource" + ], + "summary": "openapiJson", + "operationId": "openapiJsonUsingGET_1", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/yaml/configmap": { + "post": { + "tags": [ + "yaml-generate-controller" + ], + "summary": "generateConfigmapYaml", + "operationId": "generateConfigmapYamlUsingPOST", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "autoscale.maxReplicas", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "autoscale.resourceName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "autoscale.averageUtilization", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "resource.requestCpu", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "resource.requestMemory", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "resource.limitCpu", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "resource.limitMemory", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.defaultDomainYn", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.domainName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.tlsYn", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.tlsSecretName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.tlsCrt", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.tlsCrtName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.tlsKey", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "proxyInfo.tlsKeyName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "command", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "args", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "nodeSelector", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "hostPathVolumes[0].name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].mountPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].hostPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].type", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].claimName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].secretName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].shareName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].requestStorage", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostPathVolumes[0].storageClassName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].mountPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].hostPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].type", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].claimName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].secretName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].shareName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].requestStorage", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pvcVolumes[0].storageClassName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].mountPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].hostPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].type", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].claimName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].secretName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].shareName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].requestStorage", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "azureFileVolumes[0].storageClassName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "ports[0].name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "ports[0].protocol", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "ports[0].port", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "ports[0].containerPort", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "ports[0].nodePort", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "ports[0].ingressPath", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "externalIPs", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "deployId", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "deployName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "deployFrom", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "deployType", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "stageId", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "projectId", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "buildId", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "regId", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "regDate", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "modId", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "modDate", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "deployApproveFlow", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "namespace", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "image", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "controller", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "replicas", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "strategyType", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "schedule", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "hostname", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "ingressPathRewriteYn", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "serviceType", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "imagePullSecret", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "disableDelete", + "in": "query", + "required": false, + "type": "string" + } + ], "responses": { "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -2133,13 +3332,13 @@ } } }, - "/yaml/configmap": { + "/yaml/deployment": { "post": { "tags": [ "yaml-generate-controller" ], - "summary": "generateConfigmapYaml", - "operationId": "generateConfigmapYamlUsingPOST", + "summary": "generateDeploymentYaml", + "operationId": "generateDeploymentYamlUsingPOST", "consumes": [ "application/json" ], @@ -2451,1233 +3650,1049 @@ "format": "int32" }, { - "name": "ports[0].containerPort", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "ports[0].nodePort", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "ports[0].ingressPath", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "externalIPs", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "deployId", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "deployName", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "deployFrom", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "deployType", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "stageId", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "projectId", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "buildId", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "regId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "regDate", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "modId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "modDate", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "deployApproveFlow", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "namespace", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "image", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "controller", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "replicas", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "strategyType", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "schedule", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "hostname", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "ingressPathRewriteYn", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "serviceType", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "imagePullSecret", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "disableDelete", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - } - } - }, - "/yaml/deployment": { - "post": { - "tags": [ - "yaml-generate-controller" - ], - "summary": "generateDeploymentYaml", - "operationId": "generateDeploymentYamlUsingPOST", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "autoscale.maxReplicas", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "autoscale.resourceName", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "autoscale.averageUtilization", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "resource.requestCpu", + "name": "ports[0].containerPort", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "resource.requestMemory", + "name": "ports[0].nodePort", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "resource.limitCpu", + "name": "ports[0].ingressPath", "in": "query", "required": false, "type": "string" }, { - "name": "resource.limitMemory", + "name": "externalIPs", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "proxyInfo.defaultDomainYn", + "name": "deployId", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int64" }, { - "name": "proxyInfo.domainName", + "name": "deployName", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsYn", + "name": "deployFrom", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "proxyInfo.tlsSecretName", + "name": "deployType", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "proxyInfo.tlsCrt", + "name": "stageId", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int64" }, { - "name": "proxyInfo.tlsCrtName", + "name": "projectId", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int64" }, { - "name": "proxyInfo.tlsKey", + "name": "buildId", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int64" }, { - "name": "proxyInfo.tlsKeyName", + "name": "regId", "in": "query", "required": false, "type": "string" }, { - "name": "command", + "name": "regDate", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string", + "format": "date-time" }, { - "name": "args", + "name": "modId", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string" }, { - "name": "nodeSelector", + "name": "modDate", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string", + "format": "date-time" }, { - "name": "hostPathVolumes[0].name", + "name": "deployApproveFlow", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "hostPathVolumes[0].mountPath", + "name": "namespace", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].hostPath", + "name": "image", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].type", + "name": "controller", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].claimName", + "name": "replicas", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "hostPathVolumes[0].secretName", + "name": "strategyType", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].shareName", + "name": "schedule", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].requestStorage", + "name": "name", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].storageClassName", + "name": "hostname", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].name", + "name": "ingressPathRewriteYn", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].mountPath", + "name": "serviceType", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].hostPath", + "name": "imagePullSecret", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].type", + "name": "disableDelete", "in": "query", "required": false, "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } }, - { - "name": "pvcVolumes[0].claimName", - "in": "query", - "required": false, - "type": "string" + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" }, + "404": { + "description": "Not Found" + } + } + } + }, + "/yaml/hpa": { + "post": { + "tags": [ + "yaml-generate-controller" + ], + "summary": "generateHPAYaml", + "operationId": "generateHPAYamlUsingPOST", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ { - "name": "pvcVolumes[0].secretName", + "name": "target.kind", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].shareName", + "name": "target.name", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].requestStorage", + "name": "metric.type", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].storageClassName", + "name": "metric.resourceName", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].name", + "name": "metric.targetType", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].mountPath", + "name": "metric.targetAverageUtilization", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "azureFileVolumes[0].hostPath", + "name": "hpaName", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].type", + "name": "namespace", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].claimName", + "name": "minReplicas", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "azureFileVolumes[0].secretName", + "name": "maxReplicas", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/yaml/pod": { + "post": { + "tags": [ + "yaml-generate-controller" + ], + "summary": "generatePodYaml", + "operationId": "generatePodYamlUsingPOST", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ { - "name": "azureFileVolumes[0].shareName", + "name": "containers[0].lifecycle.postStart.exec.command", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "azureFileVolumes[0].requestStorage", + "name": "containers[0].lifecycle.postStart.httpGet.httpHeaders[0].name", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].storageClassName", + "name": "containers[0].lifecycle.postStart.httpGet.httpHeaders[0].value", "in": "query", "required": false, "type": "string" }, { - "name": "ports[0].name", + "name": "containers[0].lifecycle.postStart.httpGet.host", "in": "query", "required": false, "type": "string" }, { - "name": "ports[0].protocol", + "name": "containers[0].lifecycle.postStart.httpGet.path", "in": "query", "required": false, "type": "string" }, { - "name": "ports[0].port", + "name": "containers[0].lifecycle.postStart.httpGet.scheme", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "ports[0].containerPort", + "name": "containers[0].lifecycle.postStart.tcpSocket.host", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "ports[0].nodePort", + "name": "containers[0].lifecycle.preStop.exec.command", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "ports[0].ingressPath", + "name": "containers[0].lifecycle.preStop.httpGet.httpHeaders[0].name", "in": "query", "required": false, "type": "string" }, { - "name": "externalIPs", + "name": "containers[0].lifecycle.preStop.httpGet.httpHeaders[0].value", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string" }, { - "name": "deployId", + "name": "containers[0].lifecycle.preStop.httpGet.host", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "string" }, { - "name": "deployName", + "name": "containers[0].lifecycle.preStop.httpGet.path", "in": "query", "required": false, "type": "string" }, { - "name": "deployFrom", + "name": "containers[0].lifecycle.preStop.httpGet.scheme", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "deployType", + "name": "containers[0].lifecycle.preStop.tcpSocket.host", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "stageId", + "name": "containers[0].livenessProbe.exec.command", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "projectId", + "name": "containers[0].livenessProbe.httpGet.httpHeaders[0].name", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "string" }, { - "name": "buildId", + "name": "containers[0].livenessProbe.httpGet.httpHeaders[0].value", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "string" }, { - "name": "regId", + "name": "containers[0].livenessProbe.httpGet.host", "in": "query", "required": false, "type": "string" }, { - "name": "regDate", + "name": "containers[0].livenessProbe.httpGet.path", "in": "query", "required": false, - "type": "string", - "format": "date-time" + "type": "string" }, { - "name": "modId", + "name": "containers[0].livenessProbe.httpGet.scheme", "in": "query", "required": false, "type": "string" }, { - "name": "modDate", + "name": "containers[0].livenessProbe.tcpSocket.host", "in": "query", "required": false, - "type": "string", - "format": "date-time" + "type": "string" }, { - "name": "deployApproveFlow", + "name": "containers[0].livenessProbe.failureThreshold", "in": "query", "required": false, "type": "integer", "format": "int32" }, { - "name": "namespace", + "name": "containers[0].livenessProbe.initialDelaySeconds", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "image", + "name": "containers[0].livenessProbe.periodSeconds", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "controller", + "name": "containers[0].livenessProbe.successThreshold", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "replicas", + "name": "containers[0].livenessProbe.timeoutSeconds", "in": "query", "required": false, "type": "integer", "format": "int32" }, { - "name": "strategyType", + "name": "containers[0].readinessProbe.exec.command", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "schedule", + "name": "containers[0].readinessProbe.httpGet.httpHeaders[0].name", "in": "query", "required": false, "type": "string" }, { - "name": "name", + "name": "containers[0].readinessProbe.httpGet.httpHeaders[0].value", "in": "query", "required": false, "type": "string" }, { - "name": "hostname", + "name": "containers[0].readinessProbe.httpGet.host", "in": "query", "required": false, "type": "string" }, { - "name": "ingressPathRewriteYn", + "name": "containers[0].readinessProbe.httpGet.path", "in": "query", "required": false, "type": "string" }, { - "name": "serviceType", + "name": "containers[0].readinessProbe.httpGet.scheme", "in": "query", "required": false, "type": "string" }, { - "name": "imagePullSecret", + "name": "containers[0].readinessProbe.tcpSocket.host", "in": "query", "required": false, "type": "string" }, { - "name": "disableDelete", + "name": "containers[0].readinessProbe.failureThreshold", "in": "query", "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" + "type": "integer", + "format": "int32" }, - "403": { - "description": "Forbidden" + { + "name": "containers[0].readinessProbe.initialDelaySeconds", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/yaml/pod": { - "post": { - "tags": [ - "yaml-generate-controller" - ], - "summary": "generatePodYaml", - "operationId": "generatePodYamlUsingPOST", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ { - "name": "autoscale.maxReplicas", + "name": "containers[0].readinessProbe.periodSeconds", "in": "query", "required": false, "type": "integer", "format": "int32" }, { - "name": "autoscale.resourceName", + "name": "containers[0].readinessProbe.successThreshold", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "autoscale.averageUtilization", + "name": "containers[0].readinessProbe.timeoutSeconds", "in": "query", "required": false, "type": "integer", "format": "int32" }, { - "name": "resource.requestCpu", + "name": "containers[0].securityContext.capabilities.add", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "resource.requestMemory", + "name": "containers[0].securityContext.capabilities.drop", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "resource.limitCpu", + "name": "containers[0].securityContext.seLinuxOptions.level", "in": "query", "required": false, "type": "string" }, { - "name": "resource.limitMemory", + "name": "containers[0].securityContext.seLinuxOptions.role", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.defaultDomainYn", + "name": "containers[0].securityContext.seLinuxOptions.type", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.domainName", + "name": "containers[0].securityContext.seLinuxOptions.user", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsYn", + "name": "containers[0].securityContext.seccompProfile.localhostProfile", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsSecretName", + "name": "containers[0].securityContext.seccompProfile.type", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsCrt", + "name": "containers[0].securityContext.windowsOptions.gmsaCredentialSpec", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsCrtName", + "name": "containers[0].securityContext.windowsOptions.gmsaCredentialSpecName", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsKey", + "name": "containers[0].securityContext.windowsOptions.runAsUserName", "in": "query", "required": false, "type": "string" }, { - "name": "proxyInfo.tlsKeyName", + "name": "containers[0].securityContext.allowPrivilegeEscalation", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "command", + "name": "containers[0].securityContext.privileged", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "boolean" }, { - "name": "args", + "name": "containers[0].securityContext.procMount", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string" }, { - "name": "nodeSelector", + "name": "containers[0].securityContext.readOnlyRootFilesystem", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "boolean" }, { - "name": "hostPathVolumes[0].name", + "name": "containers[0].securityContext.runAsGroup", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int64" }, { - "name": "hostPathVolumes[0].mountPath", + "name": "containers[0].securityContext.runAsNonRoot", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "hostPathVolumes[0].hostPath", + "name": "containers[0].securityContext.runAsUser", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int64" }, { - "name": "hostPathVolumes[0].type", + "name": "containers[0].startupProbe.exec.command", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "hostPathVolumes[0].claimName", + "name": "containers[0].startupProbe.httpGet.httpHeaders[0].name", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].secretName", + "name": "containers[0].startupProbe.httpGet.httpHeaders[0].value", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].shareName", + "name": "containers[0].startupProbe.httpGet.host", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].requestStorage", + "name": "containers[0].startupProbe.httpGet.path", "in": "query", "required": false, "type": "string" }, { - "name": "hostPathVolumes[0].storageClassName", + "name": "containers[0].startupProbe.httpGet.scheme", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].name", + "name": "containers[0].startupProbe.tcpSocket.host", "in": "query", "required": false, "type": "string" }, { - "name": "pvcVolumes[0].mountPath", + "name": "containers[0].startupProbe.failureThreshold", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "pvcVolumes[0].hostPath", + "name": "containers[0].startupProbe.initialDelaySeconds", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "pvcVolumes[0].type", + "name": "containers[0].startupProbe.periodSeconds", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "pvcVolumes[0].claimName", + "name": "containers[0].startupProbe.successThreshold", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "pvcVolumes[0].secretName", + "name": "containers[0].startupProbe.timeoutSeconds", "in": "query", "required": false, - "type": "string" + "type": "integer", + "format": "int32" }, { - "name": "pvcVolumes[0].shareName", + "name": "containers[0].args", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "pvcVolumes[0].requestStorage", + "name": "containers[0].command", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "pvcVolumes[0].storageClassName", + "name": "containers[0].env[0].valueFrom.configMapKeyRef.key", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].name", + "name": "containers[0].env[0].valueFrom.configMapKeyRef.name", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].mountPath", + "name": "containers[0].env[0].valueFrom.configMapKeyRef.optional", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "azureFileVolumes[0].hostPath", + "name": "containers[0].env[0].valueFrom.fieldRef.apiVersion", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].type", + "name": "containers[0].env[0].valueFrom.fieldRef.fieldPath", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].claimName", + "name": "containers[0].env[0].valueFrom.resourceFieldRef.containerName", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].secretName", + "name": "containers[0].env[0].valueFrom.resourceFieldRef.resource", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].shareName", + "name": "containers[0].env[0].valueFrom.secretKeyRef.key", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].requestStorage", + "name": "containers[0].env[0].valueFrom.secretKeyRef.name", "in": "query", "required": false, "type": "string" }, { - "name": "azureFileVolumes[0].storageClassName", + "name": "containers[0].env[0].valueFrom.secretKeyRef.optional", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "ports[0].name", + "name": "containers[0].env[0].name", "in": "query", "required": false, "type": "string" }, { - "name": "ports[0].protocol", + "name": "containers[0].env[0].value", "in": "query", "required": false, "type": "string" }, { - "name": "ports[0].port", + "name": "containers[0].envFrom[0].configMapRef.name", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "ports[0].containerPort", + "name": "containers[0].envFrom[0].configMapRef.optional", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "boolean" }, { - "name": "ports[0].nodePort", + "name": "containers[0].envFrom[0].secretRef.name", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "ports[0].ingressPath", + "name": "containers[0].envFrom[0].secretRef.optional", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "externalIPs", + "name": "containers[0].envFrom[0].prefix", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string" }, { - "name": "deployId", + "name": "containers[0].ports[0].containerPort", "in": "query", "required": false, "type": "integer", - "format": "int64" + "format": "int32" }, { - "name": "deployName", + "name": "containers[0].ports[0].hostIP", "in": "query", "required": false, "type": "string" }, { - "name": "deployFrom", + "name": "containers[0].ports[0].hostPort", "in": "query", "required": false, "type": "integer", "format": "int32" }, { - "name": "deployType", + "name": "containers[0].ports[0].name", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "stageId", + "name": "containers[0].ports[0].protocol", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "string" + }, + { + "name": "containers[0].volumeDevices[0].devicePath", + "in": "query", + "required": false, + "type": "string" }, { - "name": "projectId", + "name": "containers[0].volumeDevices[0].name", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "string" }, { - "name": "buildId", + "name": "containers[0].volumeMounts[0].mountPath", "in": "query", "required": false, - "type": "integer", - "format": "int64" + "type": "string" }, { - "name": "regId", + "name": "containers[0].volumeMounts[0].mountPropagation", "in": "query", "required": false, "type": "string" }, { - "name": "regDate", + "name": "containers[0].volumeMounts[0].name", "in": "query", "required": false, - "type": "string", - "format": "date-time" + "type": "string" }, { - "name": "modId", + "name": "containers[0].volumeMounts[0].readOnly", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "modDate", + "name": "containers[0].volumeMounts[0].subPath", "in": "query", "required": false, - "type": "string", - "format": "date-time" + "type": "string" }, { - "name": "deployApproveFlow", + "name": "containers[0].volumeMounts[0].subPathExpr", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "namespace", + "name": "containers[0].image", "in": "query", "required": false, "type": "string" }, { - "name": "image", + "name": "containers[0].imagePullPolicy", "in": "query", "required": false, "type": "string" }, { - "name": "controller", + "name": "containers[0].name", "in": "query", "required": false, "type": "string" }, { - "name": "replicas", + "name": "containers[0].stdin", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "boolean" }, { - "name": "strategyType", + "name": "containers[0].stdinOnce", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "schedule", + "name": "containers[0].terminationMessagePath", "in": "query", "required": false, "type": "string" }, { - "name": "name", + "name": "containers[0].terminationMessagePolicy", "in": "query", "required": false, "type": "string" }, { - "name": "hostname", + "name": "containers[0].tty", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "ingressPathRewriteYn", + "name": "containers[0].workingDir", "in": "query", "required": false, "type": "string" }, { - "name": "serviceType", + "name": "podName", "in": "query", "required": false, "type": "string" }, { - "name": "imagePullSecret", + "name": "namespace", "in": "query", "required": false, "type": "string" }, { - "name": "disableDelete", + "name": "restartPolicy", "in": "query", "required": false, "type": "string" @@ -4242,6 +5257,23 @@ } } }, + "TextComponentDto": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "text": { + "type": "string" + } + } + }, "ResponseWrapper«OssDto»": { "type": "object", "properties": { @@ -4381,6 +5413,32 @@ } } }, + "ComponentDto": { + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/AssetsDto" + } + }, + "format": { + "type": "string" + }, + "group": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "repository": { + "type": "string" + } + } + }, "RatePlans": { "type": "object", "properties": { @@ -4407,6 +5465,24 @@ } } }, + "ResponseWrapper«ComponentDto»": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "data": { + "$ref": "#/definitions/ComponentDto" + }, + "detail": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, "DockerDto": { "type": "object", "properties": { @@ -4447,6 +5523,103 @@ } } }, + "URI": { + "type": "object", + "properties": { + "absolute": { + "type": "boolean" + }, + "authority": { + "type": "string" + }, + "fragment": { + "type": "string" + }, + "host": { + "type": "string" + }, + "opaque": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "query": { + "type": "string" + }, + "rawAuthority": { + "type": "string" + }, + "rawFragment": { + "type": "string" + }, + "rawPath": { + "type": "string" + }, + "rawQuery": { + "type": "string" + }, + "rawSchemeSpecificPart": { + "type": "string" + }, + "rawUserInfo": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "schemeSpecificPart": { + "type": "string" + }, + "userInfo": { + "type": "string" + } + } + }, + "URL": { + "type": "object", + "properties": { + "authority": { + "type": "string" + }, + "content": { + "type": "object" + }, + "defaultPort": { + "type": "integer", + "format": "int32" + }, + "file": { + "type": "string" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "protocol": { + "type": "string" + }, + "query": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "userInfo": { + "type": "string" + } + } + }, "Result": { "type": "object", "properties": { @@ -4565,6 +5738,27 @@ } } }, + "AssetsDto": { + "type": "object", + "properties": { + "blobCreated": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "downloadUrl": { + "type": "string" + }, + "fileSize": { + "type": "integer", + "format": "int32" + }, + "id": { + "type": "string" + } + } + }, "RepositoryDto": { "type": "object", "properties": { @@ -4725,6 +5919,38 @@ } } }, + "InputStream": { + "type": "object" + }, + "Resource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "file": { + "type": "file" + }, + "filename": { + "type": "string" + }, + "inputStream": { + "$ref": "#/definitions/InputStream" + }, + "open": { + "type": "boolean" + }, + "readable": { + "type": "boolean" + }, + "uri": { + "$ref": "#/definitions/URI" + }, + "url": { + "$ref": "#/definitions/URL" + } + } + }, "ResponseWrapper«RepositoryDto»": { "type": "object", "properties": { @@ -4896,9 +6122,30 @@ "referenceValue": { "type": "string" }, - "refernectIdx": { + "referncetIdx": { + "type": "integer", + "format": "int32" + } + } + }, + "ResponseWrapper«List«ComponentDto»»": { + "type": "object", + "properties": { + "code": { "type": "integer", "format": "int32" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/ComponentDto" + } + }, + "detail": { + "type": "string" + }, + "message": { + "type": "string" } } }, @@ -4925,6 +6172,72 @@ } } }, + "File": { + "type": "object", + "properties": { + "absolute": { + "type": "boolean" + }, + "absoluteFile": { + "type": "file" + }, + "absolutePath": { + "type": "string" + }, + "canonicalFile": { + "type": "file" + }, + "canonicalPath": { + "type": "string" + }, + "directory": { + "type": "boolean" + }, + "executable": { + "type": "boolean" + }, + "file": { + "type": "boolean" + }, + "freeSpace": { + "type": "integer", + "format": "int64" + }, + "hidden": { + "type": "boolean" + }, + "lastModified": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "parentFile": { + "type": "file" + }, + "path": { + "type": "string" + }, + "readable": { + "type": "boolean" + }, + "totalSpace": { + "type": "integer", + "format": "int64" + }, + "usableSpace": { + "type": "integer", + "format": "int64" + }, + "writable": { + "type": "boolean" + } + } + }, "ArtifactHubPackage": { "type": "object", "properties": {