Skip to content

Commit

Permalink
Fixed parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Helber Belmiro <[email protected]>
  • Loading branch information
hbelmiro committed Nov 1, 2024
1 parent 93f6fb4 commit 258534d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 9 additions & 2 deletions backend/src/apiserver/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const (
MetadataGrpcServiceServicePort string = "METADATA_GRPC_SERVICE_SERVICE_PORT"
MetadataTLSEnabled string = "METADATA_TLS_ENABLED"
SignedURLExpiryTimeSeconds string = "SIGNED_URL_EXPIRY_TIME_SECONDS"
CaCertPath string = "CA_CERT_PATH"
CaBundleMountPath string = "ARTIFACT_COPY_STEP_CABUNDLE_MOUNTPATH"
CaBundleConfigMapKey string = "ARTIFACT_COPY_STEP_CABUNDLE_CONFIGMAP_KEY"
)

func IsPipelineVersionUpdatedByDefault() bool {
Expand Down Expand Up @@ -150,5 +151,11 @@ func GetMetadataTLSEnabled() bool {
}

func GetCaCertPath() string {
return GetStringConfigWithDefault(CaCertPath, DefaultCaCertPath)
caBundleMountPath := GetStringConfigWithDefault(CaBundleMountPath, "")
if caBundleMountPath != "" {
caBundleConfigMapKey := GetStringConfigWithDefault(CaBundleConfigMapKey, "")
return caBundleMountPath + "/" + caBundleConfigMapKey
} else {
return ""
}
}
5 changes: 3 additions & 2 deletions backend/src/v2/compiler/argocompiler/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package argocompiler
import (
"fmt"
wfapi "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
"github.com/kubeflow/pipelines/backend/src/apiserver/common"
k8score "k8s.io/api/core/v1"
"os"
"strconv"
Expand Down Expand Up @@ -99,8 +100,8 @@ func GetMLPipelineServicePortGRPC() string {
// if CA Bundle env vars are specified.
func ConfigureCABundle(tmpl *wfapi.Template) {
caBundleCfgMapName := os.Getenv("ARTIFACT_COPY_STEP_CABUNDLE_CONFIGMAP_NAME")
caBundleCfgMapKey := os.Getenv("ARTIFACT_COPY_STEP_CABUNDLE_CONFIGMAP_KEY")
caBundleMountPath := os.Getenv("ARTIFACT_COPY_STEP_CABUNDLE_MOUNTPATH")
caBundleCfgMapKey := os.Getenv(common.CaBundleConfigMapKey)
caBundleMountPath := os.Getenv(common.CaBundleMountPath)
if caBundleCfgMapName != "" && caBundleCfgMapKey != "" {
caFile := fmt.Sprintf("%s/%s", caBundleMountPath, caBundleCfgMapKey)
var certDirectories = []string{
Expand Down

0 comments on commit 258534d

Please sign in to comment.