Skip to content

Commit

Permalink
fix(admintools): add mtls environment variables for temporal cli >= 0…
Browse files Browse the repository at this point in the history
….9.0
  • Loading branch information
alexandrevilain authored and ganievs committed Nov 27, 2023
1 parent 6a63ca0 commit a1abf82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/cluster-mtls/02-temporal-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: prod
namespace: demo
spec:
version: 1.20.0
version: 1.21.2
numHistoryShards: 1
jobTtlSecondsAfterFinished: 300
persistence:
Expand Down
3 changes: 3 additions & 0 deletions internal/resource/admintools/deployment_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ func (b *DeploymentBuilder) Update(object client.Object) error {
},
)

// Add tctl environment variables
env = append(env, certmanager.GetTLSEnvironmentVariables(b.instance, "TEMPORAL_CLI", admintoolsCertsMountPath)...)
// Add temporal cli environment variables (>= 0.9.0)
env = append(env, certmanager.GetTLSEnvironmentVariables(b.instance, "TEMPORAL", admintoolsCertsMountPath)...)
}

deployment.Spec.Replicas = pointer.Int32(1)
Expand Down
4 changes: 4 additions & 0 deletions internal/resource/mtls/certmanager/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ func GetTLSEnvironmentVariables(instance *v1beta1.TemporalCluster, envPrefix, ce
Name: addPrefix(envPrefix, "TLS_ENABLE_HOST_VERIFICATION"),
Value: "true",
},
{
Name: addPrefix(envPrefix, "TLS_DISABLE_HOST_VERIFICATION"),
Value: "false",
},
{
Name: addPrefix(envPrefix, "TLS_SERVER_NAME"),
Value: instance.Spec.MTLS.Frontend.ServerName(instance.ServerName()),
Expand Down

0 comments on commit a1abf82

Please sign in to comment.