Skip to content

Commit

Permalink
Swap get_float for get_int (#757)
Browse files Browse the repository at this point in the history
Replace instances of get_float with get_int when pulling integer-based configuration values

Signed-off-by: Scott Lowe <[email protected]>
  • Loading branch information
scottslowe authored Feb 23, 2024
1 parent a2b300b commit 934f82f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion container-gcp-python/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
container_port = config.get_int("containerPort", 8080)
cpu = config.get_int("cpu", 1)
memory = config.get("memory", "1Gi")
concurrency = config.get_float("concurrency", 50)
concurrency = config.get_int("concurrency", 50)

# Import the provider's configuration settings.
gcp_config = pulumi.Config("gcp")
Expand Down
6 changes: 3 additions & 3 deletions kubernetes-aws-python/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# Get some values from the Pulumi configuration (or use defaults)
config = pulumi.Config()
min_cluster_size = config.get_float("minClusterSize", 3)
max_cluster_size = config.get_float("maxClusterSize", 6)
desired_cluster_size = config.get_float("desiredClusterSize", 3)
min_cluster_size = config.get_int("minClusterSize", 3)
max_cluster_size = config.get_int("maxClusterSize", 6)
desired_cluster_size = config.get_int("desiredClusterSize", 3)
eks_node_instance_type = config.get("eksNodeInstanceType", "t3.medium")
vpc_network_cidr = config.get("vpcNetworkCidr", "10.0.0.0/16")

Expand Down
2 changes: 1 addition & 1 deletion kubernetes-gcp-python/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
gcp_region = provider_cfg.get("region", "us-central1")
# Get some additional configuration values
config = pulumi.Config()
nodes_per_zone = config.get_float("nodesPerZone", 1)
nodes_per_zone = config.get_int("nodesPerZone", 1)

# Create a new network
gke_network = gcp.compute.Network(
Expand Down
2 changes: 1 addition & 1 deletion webapp-kubernetes-python/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Get some values from the Pulumi stack configuration, or use defaults
config = pulumi.Config()
k8sNamespace = config.get("namespace", "default")
numReplicas = config.get_float("replicas", 1)
numReplicas = config.get_int("replicas", 1)
app_labels = {
"app": "nginx",
}
Expand Down

0 comments on commit 934f82f

Please sign in to comment.