Skip to content

Commit

Permalink
Rename mount_path to mount_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
xlight05 committed Mar 30, 2024
1 parent 689c7cf commit bd3f296
Show file tree
Hide file tree
Showing 38 changed files with 310 additions and 329 deletions.
11 changes: 11 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change Log
This file contains all the notable changes done to the Ballerina Cloud package through the releases.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - Unreleased

### Fixed

- [Fix the inconsistency in overwriting identical cookies](https://github.com/ballerina-platform/ballerina-library/issues/6194)
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void validateDeployment() {
// Validate config file
Assert.assertEquals(container.getEnv().get(0).getName(), "BAL_CONFIG_FILES");
Assert.assertEquals(container.getEnv().get(0).getValue(),
"/home/ballerina/conf1/Config1.toml:/home/ballerina/conf/Config.toml:" +
"/home/ballerina/conf/Config.toml:/home/ballerina/conf1/Config1.toml:" +
"/home/ballerina/secrets/mysql-secrets.toml:/home/ballerina/secrets1/additional-secrets.toml:");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void validateDeployment() {
// Validate config file
Assert.assertEquals(container.getEnv().get(0).getName(), "BAL_CONFIG_FILES");
Assert.assertEquals(container.getEnv().get(0).getValue(),
"/home/ballerina/conf1/Config1.toml:/home/ballerina/conf/Config.toml:" +
"/home/ballerina/conf/Config.toml:/home/ballerina/conf1/Config1.toml:" +
"/home/ballerina/secrets/mysql-secrets.toml:/home/ballerina/secrets1/additional-secrets.toml:");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void compileSample() throws IOException, InterruptedException {
case "config-config-map":
ballerinaConf = (ConfigMap) data;
break;
case "hello-data-txt":
case "hello-data-txtcfg0":
dataMap = (ConfigMap) data;
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ public void validateDeployment() {
Assert.assertNotNull(deployment);
Assert.assertEquals(deployment.getMetadata().getName(), "hello-deployment");
Assert.assertEquals(deployment.getSpec().getReplicas().intValue(), 1);
Assert.assertEquals(deployment.getSpec().getTemplate().getSpec().getVolumes().size(), 5);
Assert.assertEquals(deployment.getSpec().getTemplate().getSpec().getVolumes().size(), 4);
Assert.assertEquals(deployment.getMetadata().getLabels().get(KubernetesConstants
.KUBERNETES_SELECTOR_KEY), "hello");
Assert.assertEquals(deployment.getSpec().getTemplate().getSpec().getContainers().size(), 1);

// Assert Containers
Container container = deployment.getSpec().getTemplate().getSpec().getContainers().get(0);
Assert.assertEquals(container.getVolumeMounts().size(), 5);
Assert.assertEquals(container.getVolumeMounts().size(), 4);
Assert.assertEquals(container.getImage(), DOCKER_IMAGE);
Assert.assertEquals(container.getPorts().size(), 1);
Assert.assertEquals(container.getEnv().size(), 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"character": 0
}
},
"newText": "# This file contains most used configurations supported by Ballerina Code to Cloud\n# All the fields are optional. If these fields are not specified, default value will be taken from the compiler.\n# Full Code to Cloud specification can be accessed from https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md\n# Uncomment Any field below if you want to override the default value.\n\n# Settings related to artifacts generation\n#[settings]\n#buildImage = true # Build the Docker image while building the project\n#thinJar = true # Use the thin jars in the container\n#\n# Properties related to the container image\n#[container.image]\n#name = \"hello\" # Name of the container image\n#repository = \"ballerina\" # Container repository to host the container\n#tag = \"latest\" # Tag of the container\n#base = \"ballerina/jvm-runtime:2.0\" # Base container of the container image\n#\n# Copy the files to the container image\n#[[container.copy.files]]\n#sourceFile = \"./data/data.txt\" # Path to the external file\n#target = \"/home/ballerina/data/data.txt\" # Path of the file within the container\n#\n# External files required for the code\n#[[cloud.config.maps]]\n#file = \"resource/file.text\" # Path of the external file\n#mount_path = \"/home/ballerina/foo/file.conf\" # Path of the file in the container\n#\n# Environment variables required for the application\n#[[cloud.config.envs]]\n#key_ref = \"FOO\" # Key of the environment variable\n#name = \"foo\" # Name of the env if it is different from the key\n#config_name = \"module-foo\" # Name of the config config map\n#\n# Properties related to the deployment\n#[cloud.deployment]\n#min_memory = \"100Mi\" # Minimum memory allocated to the container\n#max_memory = \"512Mi\" # Maximum memory allocated to the container\n#min_cpu = \"200m\" # Minimum CPU allocated to the container\n#max_cpu = \"500m\" # Maximum CPU allocated to the container\n#\n# Matrices to auto-scale the container\n#[cloud.deployment.autoscaling]\n#min_replicas = 1 # Minimum number of replicas of the container alive at a given time\n#max_replicas = 2 # Maximum number of replicas of the container alive at a given time\n#cpu = 50 # CPU Utilization threshold for spawning a new instance\n#\n# Probe to indicate whether the container is ready to respond to requests. No readiness probe will be generated if not specified\n#[cloud.deployment.probes.readiness]\n#port = 9091 # Port of the readiness probe endpoint\n#path = \"/probes/readyz\" # Endpoint of the readiness probe\n#\n# Probe to indicate whether the container is running. No liveness probe will be generated if not specified\n#[cloud.deployment.probes.liveness]\n#port = 9091 # Port of the liveness probe endpoint\n#path = \"/probes/healthz\" # Endpoint of the liveness probe\n#\n# Volume definitions of the application. No default volumes will be generated if not specified\n#[[cloud.deployment.storage.volumes]]\n#name = \"volume1\" # Name of the volume\n#local_path = \"files\" # Path of the volume\n#size = \"2Gi\" # Maximum size of the volume\n#\n# Properties related to the builder image of the multistage build\n#[graalvm.builder]\n#base = \"ghcr.io/graalvm/native-image-community:17-ol8\" # base image of the builder image\n#buildCmd = \"native-image -jar hello.jar hello\" # RUN statement to build the native image\n#"
"newText": "# This file contains most used configurations supported by Ballerina Code to Cloud\n# All the fields are optional. If these fields are not specified, default value will be taken from the compiler.\n# Full Code to Cloud specification can be accessed from https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md\n# Uncomment Any field below if you want to override the default value.\n\n# Settings related to artifacts generation\n#[settings]\n#buildImage = true # Build the Docker image while building the project\n#thinJar = true # Use the thin jars in the container\n#\n# Properties related to the container image\n#[container.image]\n#name = \"hello\" # Name of the container image\n#repository = \"ballerina\" # Container repository to host the container\n#tag = \"latest\" # Tag of the container\n#base = \"ballerina/jvm-runtime:2.0\" # Base container of the container image\n#\n# Copy the files to the container image\n#[[container.copy.files]]\n#sourceFile = \"./data/data.txt\" # Path to the external file\n#target = \"/home/ballerina/data/data.txt\" # Path of the file within the container\n#\n# External files required for the code\n#[[cloud.config.maps]]\n#file = \"resource/file.txt\" # Path of the external file\n#mount_dir = \"/home/ballerina/resource\" # Directory of the file within the container\n#\n# Environment variables required for the application\n#[[cloud.config.envs]]\n#key_ref = \"FOO\" # Key of the environment variable\n#name = \"foo\" # Name of the env if it is different from the key\n#config_name = \"module-foo\" # Name of the config config map\n#\n# Properties related to the deployment\n#[cloud.deployment]\n#min_memory = \"100Mi\" # Minimum memory allocated to the container\n#max_memory = \"512Mi\" # Maximum memory allocated to the container\n#min_cpu = \"200m\" # Minimum CPU allocated to the container\n#max_cpu = \"500m\" # Maximum CPU allocated to the container\n#\n# Matrices to auto-scale the container\n#[cloud.deployment.autoscaling]\n#min_replicas = 1 # Minimum number of replicas of the container alive at a given time\n#max_replicas = 2 # Maximum number of replicas of the container alive at a given time\n#cpu = 50 # CPU Utilization threshold for spawning a new instance\n#\n# Probe to indicate whether the container is ready to respond to requests. No readiness probe will be generated if not specified\n#[cloud.deployment.probes.readiness]\n#port = 9091 # Port of the readiness probe endpoint\n#path = \"/probes/readyz\" # Endpoint of the readiness probe\n#\n# Probe to indicate whether the container is running. No liveness probe will be generated if not specified\n#[cloud.deployment.probes.liveness]\n#port = 9091 # Port of the liveness probe endpoint\n#path = \"/probes/healthz\" # Endpoint of the liveness probe\n#\n# Volume definitions of the application. No default volumes will be generated if not specified\n#[[cloud.deployment.storage.volumes]]\n#name = \"volume1\" # Name of the volume\n#local_path = \"files\" # Path of the volume\n#size = \"2Gi\" # Maximum size of the volume\n#\n# Properties related to the builder image of the multistage build\n#[graalvm.builder]\n#base = \"ghcr.io/graalvm/native-image-community:17-ol8\" # base image of the builder image\n#buildCmd = \"native-image -jar hello.jar hello\" # RUN statement to build the native image\n#"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"insertText": "[settings]"
},
{
"label": "mount_path",
"label": "mount_dir",
"kind": "Snippet",
"detail": "String",
"sortText": "A",
"insertText": "mount_path=\"${1:}\"",
"insertText": "mount_dir=\"${1:}\"",
"insertTextFormat": "Snippet"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ tag="v1"

[[cloud.config.maps]]
file="./conf/data.txt"
mount_path="/home/ballerina/data"
mount_dir="/home/ballerina/data"
[[cloud.config.files]]
file="./conf/Config1.toml"
[[cloud.config.files]]
file="./conf/Config2.toml"

[[cloud.secret.files]]
file="resource/public.crt"
mount_path="/home/ballerina/resource/public.crt"
mount_dir="/home/ballerina/resource"

[[cloud.secret.files]]
file="resource/private.key"
mount_path="/home/ballerina/resource/private.key"
mount_dir="/home/ballerina/resource"
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[[cloud.secret.files]]
file="resources/public.crt"
mount_path="/home/ballerina/resources/public.crt"
mount_dir="/home/ballerina/resources"

[[cloud.secret.files]]
file="resources/public.crt"
mount_path="/home/ballerina/resources/public.crt"
mount_dir="/home/ballerina/resources"

[settings]
buildImage = false
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ tag="v1"

[[cloud.config.maps]]
file="./conf/data.txt"
mount_path="/home/ballerina/data"
mount_dir="/home/ballerina/data"
[[cloud.config.files]]
file="./conf/Config.toml"

[[cloud.secret.files]]
file="resource/private.key"
mount_path="/home/ballerina/resource/private.key"

[[cloud.secret.files]]
file="resource/public.crt"
mount_path="/home/ballerina/resource/public.crt"
file="./resource"
mount_dir="/home/ballerina/resource"

[settings]
singleYAML=false
Expand Down
Loading

0 comments on commit bd3f296

Please sign in to comment.