diff --git a/chart-sync/go.mod b/chart-sync/go.mod index c9d252c9f..c5fab584d 100644 --- a/chart-sync/go.mod +++ b/chart-sync/go.mod @@ -5,7 +5,7 @@ go 1.22.4 toolchain go1.22.6 replace ( - github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e + github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 helm.sh/helm/v3 v3.14.3 => github.com/devtron-labs/helm/v3 v3.14.1-0.20240401080259-90238cf69e42 ) diff --git a/chart-sync/go.sum b/chart-sync/go.sum index 41ed51b1b..fe3500ed0 100644 --- a/chart-sync/go.sum +++ b/chart-sync/go.sum @@ -54,8 +54,8 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/devtron-labs/helm/v3 v3.14.1-0.20240401080259-90238cf69e42 h1:pJmK44QaSztOiZe0iQHNf0sdy5KwkAeceydyhOG4RaY= github.com/devtron-labs/helm/v3 v3.14.1-0.20240401080259-90238cf69e42/go.mod h1:v6myVbyseSBJTzhmeE39UcPLNv6cQK6qss3dvgAySaE= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= diff --git a/chart-sync/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/chart-sync/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/chart-sync/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/chart-sync/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/chart-sync/vendor/modules.txt b/chart-sync/vendor/modules.txt index 36645d97a..2de2f38b3 100644 --- a/chart-sync/vendor/modules.txt +++ b/chart-sync/vendor/modules.txt @@ -93,7 +93,7 @@ github.com/containerd/platforms # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/git-manager/util github.com/devtron-labs/common-lib/helmLib/registry @@ -789,4 +789,4 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.3.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/ci-runner/go.mod b/ci-runner/go.mod index fac59db38..69105bf2d 100644 --- a/ci-runner/go.mod +++ b/ci-runner/go.mod @@ -4,7 +4,7 @@ go 1.21 toolchain go1.21.8 -replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 require ( github.com/Knetic/govaluate v3.0.0+incompatible diff --git a/ci-runner/go.sum b/ci-runner/go.sum index c8d9dedb8..92843375d 100644 --- a/ci-runner/go.sum +++ b/ci-runner/go.sum @@ -57,8 +57,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= diff --git a/ci-runner/helper/DockerHelper.go b/ci-runner/helper/DockerHelper.go index de4081849..e5f440c15 100644 --- a/ci-runner/helper/DockerHelper.go +++ b/ci-runner/helper/DockerHelper.go @@ -344,7 +344,7 @@ func (impl *DockerHelperImpl) BuildArtifact(ciRequest *CommonWorkflowRequest) (s } useBuildxK8sDriver, eligibleK8sDriverNodes = dockerBuildConfig.CheckForBuildXK8sDriver() if useBuildxK8sDriver { - err = impl.createBuildxBuilderWithK8sDriver(ciContext, ciRequest.DockerConnection, dockerBuildConfig.BuildxDriverImage, eligibleK8sDriverNodes, ciRequest.PipelineId, ciRequest.WorkflowId) + err = impl.createBuildxBuilderWithK8sDriver(ciContext, ciRequest, ciRequest.DockerConnection, dockerBuildConfig.BuildxDriverImage, eligibleK8sDriverNodes, ciRequest.PipelineId, ciRequest.WorkflowId) if err != nil { log.Println(util.DEVTRON, " error in creating buildxDriver , err : ", err.Error()) return err @@ -938,14 +938,17 @@ func (impl *DockerHelperImpl) createBuildxBuilderForMultiArchBuild(ciContext cic return nil } -func (impl *DockerHelperImpl) createBuildxBuilderWithK8sDriver(ciContext cicxt.CiContext, dockerConnection, buildxDriverImage string, builderNodes []map[string]string, ciPipelineId, ciWorkflowId int) error { +func (impl *DockerHelperImpl) createBuildxBuilderWithK8sDriver(ciContext cicxt.CiContext, ciRequest *CommonWorkflowRequest, dockerConnection, buildxDriverImage string, builderNodes []map[string]string, ciPipelineId, ciWorkflowId int) error { if len(builderNodes) == 0 { return errors.New("atleast one node is expected for builder with kubernetes driver") } deploymentNames := make([]string, 0) for i := 0; i < len(builderNodes); i++ { nodeOpts := builderNodes[i] - builderCmd, deploymentName := getBuildxK8sDriverCmd(dockerConnection, buildxDriverImage, nodeOpts, ciPipelineId, ciWorkflowId) + builderCmd, deploymentName, err := getBuildxK8sDriverCmd(ciRequest, dockerConnection, buildxDriverImage, nodeOpts, ciPipelineId, ciWorkflowId) + if err != nil { + return err + } deploymentNames = append(deploymentNames, deploymentName) // first node is used as default node, we create builder with --use flag, then we append other nodes if i == 0 { @@ -957,7 +960,7 @@ func (impl *DockerHelperImpl) createBuildxBuilderWithK8sDriver(ciContext cicxt.C fmt.Println(util.DEVTRON, " cmd : ", builderCmd) builderExecCmd := impl.GetCommandToExecute(builderCmd) - err := impl.cmdExecutor.RunCommand(ciContext, builderExecCmd) + err = impl.cmdExecutor.RunCommand(ciContext, builderExecCmd) if err != nil { fmt.Println(util.DEVTRON, " builderCmd : ", builderCmd, " err : ", err, " error : ") return err @@ -1017,7 +1020,7 @@ func (impl *DockerHelperImpl) runCmd(cmd string) (error, *bytes.Buffer) { return err, errBuf } -func getBuildxK8sDriverCmd(dockerConnection, buildxDriverImage string, driverOpts map[string]string, ciPipelineId, ciWorkflowId int) (string, string) { +func getBuildxK8sDriverCmd(ciRequest *CommonWorkflowRequest, dockerConnection, buildxDriverImage string, driverOpts map[string]string, ciPipelineId, ciWorkflowId int) (string, string, error) { buildxCreate := "docker buildx create --buildkitd-flags '--allow-insecure-entitlement network.host --allow-insecure-entitlement security.insecure' --name=%s --driver=kubernetes --node=%s --bootstrap " nodeName := driverOpts["node"] if nodeName == "" { @@ -1029,6 +1032,15 @@ func getBuildxK8sDriverCmd(dockerConnection, buildxDriverImage string, driverOpt buildxCreate += " --platform=%s " buildxCreate = fmt.Sprintf(buildxCreate, platforms) } + // add driver options for app labels and annotations + var err error + if ciRequest.PropagateLabelsInBuildxPod { + driverOpts["driverOptions"], err = getBuildXDriverOptionsWithLabelsAndAnnotations(driverOpts["driverOptions"]) + if err != nil { + return "", "", err + } + } + driverOpts["driverOptions"] = getBuildXDriverOptionsWithImage(buildxDriverImage, driverOpts["driverOptions"]) if len(driverOpts["driverOptions"]) > 0 { buildxCreate += " '--driver-opt=%s' " @@ -1039,7 +1051,7 @@ func getBuildxK8sDriverCmd(dockerConnection, buildxDriverImage string, driverOpt buildkitToml = fmt.Sprintf("--config %s", BuildkitdConfigPath) } buildxCreate = fmt.Sprintf("%s %s", buildxCreate, buildkitToml) - return buildxCreate, nodeName + return buildxCreate, nodeName, nil } func getBuildXDriverOptionsWithImage(buildxDriverImage, driverOptions string) string { @@ -1054,6 +1066,88 @@ func getBuildXDriverOptionsWithImage(buildxDriverImage, driverOptions string) st return driverOptions } +func getBuildXDriverOptionsWithLabelsAndAnnotations(driverOptions string) (string, error) { + // not passing annotation as of now because --driver-opt=annotations is not supported by buildx if contains quotes + labels := make(map[string]string) + + // Read labels from file + labelsPath := utils.DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH + "/" + utils.POD_LABELS + labelsOut, err := readFileAndLogErrors(labelsPath) + if err != nil { + return "", err + } + + // Parse labels + if len(labelsOut) > 0 { + labels = parseKeyValuePairs(string(labelsOut)) + } + + // Combine driver options + driverOptions = getBuildXDriverOptions(utils.POD_LABELS, labels, driverOptions) + + //annotations := make(map[string]string) + //annotationsPath := utils.DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH + "/" + utils.POD_ANNOTATIONS + //annotationsOut, err := readFileAndLogErrors(annotationsPath) + //if err != nil { + // return "", err + //} + //if len(annotationsOut) > 0 { + // annotations = parseKeyValuePairs(string(annotationsOut)) + //} + //driverOptions = getBuildXDriverOptions(utils.POD_ANNOTATIONS, annotations, driverOptions) + + return driverOptions, nil +} + +func readFileAndLogErrors(filePath string) ([]byte, error) { + content, err := os.ReadFile(filePath) + if err != nil { + if errors.Is(err, os.ErrNotExist) { + log.Println(util.DEVTRON, "file not found at path:", filePath) + return content, nil + } else { + log.Println(util.DEVTRON, "IO error while reading file at path:", filePath, "err:", err) + return nil, err + } + } + return content, nil +} + +func parseKeyValuePairs(input string) map[string]string { + keyValuePairs := make(map[string]string) + lines := strings.Split(input, "\n") + for _, line := range lines { + line = strings.TrimSpace(line) + if len(line) > 0 { + kv := strings.SplitN(line, "=", 2) + if len(kv) == 2 { + key := strings.TrimSpace(kv[0]) + value := strings.Trim(strings.TrimSpace(kv[1]), `"`) + keyValuePairs[key] = value + } + } + } + return keyValuePairs +} + +func getBuildXDriverOptions(optionType string, options map[string]string, driverOptions string) string { + if len(options) > 0 { + optionStr := fmt.Sprintf("\"%s=", optionType) + for k, v := range options { + optionStr += fmt.Sprintf("%s=%s,", k, v) + } + optionStr = strings.TrimSuffix(optionStr, ",") + optionStr += "\"" + + if len(driverOptions) > 0 { + driverOptions += fmt.Sprintf(",%s", optionStr) + } else { + driverOptions = optionStr + } + } + return driverOptions +} + func (impl *DockerHelperImpl) StopDocker(ciContext cicxt.CiContext) error { cmd := exec.Command("docker", "ps", "-a", "-q") out, err := cmd.Output() diff --git a/ci-runner/helper/EventHelper.go b/ci-runner/helper/EventHelper.go index 06c8ebfea..87595335b 100644 --- a/ci-runner/helper/EventHelper.go +++ b/ci-runner/helper/EventHelper.go @@ -162,6 +162,7 @@ type CommonWorkflowRequest struct { ImageScanRetryDelay int `json:"imageScanRetryDelay,omitempty"` ShouldPullDigest bool `json:"shouldPullDigest,omitempty"` EnableSecretMasking bool `json:"enableSecretMasking"` + PropagateLabelsInBuildxPod bool `json:"propagateLabelsInBuildxPod"` // Data from CD Workflow service WorkflowRunnerId int `json:"workflowRunnerId"` CdPipelineId int `json:"cdPipelineId"` diff --git a/ci-runner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/ci-runner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/ci-runner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/ci-runner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/ci-runner/vendor/modules.txt b/ci-runner/vendor/modules.txt index 3e8b35333..4f72a983e 100644 --- a/ci-runner/vendor/modules.txt +++ b/ci-runner/vendor/modules.txt @@ -118,7 +118,7 @@ github.com/cespare/xxhash/v2 # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/devtron-labs/common-lib v0.19.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.19.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/blob-storage github.com/devtron-labs/common-lib/constants @@ -860,4 +860,4 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.3.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/common-lib/utils/CommonUtils.go b/common-lib/utils/CommonUtils.go index 4f92471ed..24e05eb36 100644 --- a/common-lib/utils/CommonUtils.go +++ b/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string diff --git a/git-sensor/go.mod b/git-sensor/go.mod index 8cbe6bf7e..515894f71 100644 --- a/git-sensor/go.mod +++ b/git-sensor/go.mod @@ -4,7 +4,7 @@ go 1.21 toolchain go1.22.4 -replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 require ( github.com/caarlos0/env v3.5.0+incompatible diff --git a/git-sensor/go.sum b/git-sensor/go.sum index 838edbb65..4a4778065 100644 --- a/git-sensor/go.sum +++ b/git-sensor/go.sum @@ -29,8 +29,8 @@ github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/devtron-labs/protos v0.0.3-0.20240809072909-83171af34169 h1:9OMZv0/fOWKK9s9BLTofFL/BO79TdyvC1Sc1HsC4esQ= github.com/devtron-labs/protos v0.0.3-0.20240809072909-83171af34169/go.mod h1:1TqULGlTey+VNhAu/ag7NJuUvByJemkqodsc9L5PHJk= github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= diff --git a/git-sensor/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/git-sensor/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/git-sensor/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/git-sensor/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/git-sensor/vendor/modules.txt b/git-sensor/vendor/modules.txt index 0e4979c61..4a7f1a565 100644 --- a/git-sensor/vendor/modules.txt +++ b/git-sensor/vendor/modules.txt @@ -62,7 +62,7 @@ github.com/cyphar/filepath-securejoin # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/constants github.com/devtron-labs/common-lib/git-manager @@ -481,4 +481,4 @@ gopkg.in/yaml.v3 # mellium.im/sasl v0.3.2 ## explicit; go 1.20 mellium.im/sasl -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/image-scanner/go.mod b/image-scanner/go.mod index d729187f0..cd86a9b4b 100644 --- a/image-scanner/go.mod +++ b/image-scanner/go.mod @@ -74,4 +74,4 @@ require ( mellium.im/sasl v0.3.2 // indirect ) -replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/image-scanner/go.sum b/image-scanner/go.sum index 4e9867a26..d7e8aad3b 100644 --- a/image-scanner/go.sum +++ b/image-scanner/go.sum @@ -280,8 +280,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= diff --git a/image-scanner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/image-scanner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/image-scanner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/image-scanner/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/image-scanner/vendor/modules.txt b/image-scanner/vendor/modules.txt index 0e3cf90f1..447cac4fc 100644 --- a/image-scanner/vendor/modules.txt +++ b/image-scanner/vendor/modules.txt @@ -72,7 +72,7 @@ github.com/cespare/xxhash/v2 github.com/coreos/clair/api/v3/clairpb github.com/coreos/clair/database github.com/coreos/clair/ext/versionfmt -# github.com/devtron-labs/common-lib v0.19.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.19.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/constants github.com/devtron-labs/common-lib/git-manager @@ -439,4 +439,4 @@ google.golang.org/protobuf/types/known/wrapperspb # mellium.im/sasl v0.3.2 ## explicit; go 1.20 mellium.im/sasl -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/kubelink/go.mod b/kubelink/go.mod index cc4c75bbc..76651ca16 100644 --- a/kubelink/go.mod +++ b/kubelink/go.mod @@ -177,7 +177,7 @@ require ( ) replace ( - github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e + github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v1.18.0 // https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-505627280 k8s.io/api => k8s.io/api v0.29.0 diff --git a/kubelink/go.sum b/kubelink/go.sum index c3a42f0ba..4b20b7e4e 100644 --- a/kubelink/go.sum +++ b/kubelink/go.sum @@ -79,8 +79,8 @@ github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/distribution/distribution/v3 v3.0.0-beta.1 h1:X+ELTxPuZ1Xe5MsD3kp2wfGUhc8I+MPfRis8dZ818Ic= diff --git a/kubelink/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/kubelink/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/kubelink/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/kubelink/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/kubelink/vendor/modules.txt b/kubelink/vendor/modules.txt index 0794ceeb8..32975b949 100644 --- a/kubelink/vendor/modules.txt +++ b/kubelink/vendor/modules.txt @@ -127,7 +127,7 @@ github.com/cyphar/filepath-securejoin # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/async github.com/devtron-labs/common-lib/constants @@ -1353,7 +1353,7 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.3.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 # go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v1.18.0 # k8s.io/api => k8s.io/api v0.29.0 # k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.0 diff --git a/kubewatch/go.mod b/kubewatch/go.mod index 25d5fa737..79212cd75 100644 --- a/kubewatch/go.mod +++ b/kubewatch/go.mod @@ -245,4 +245,4 @@ replace ( k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.29.7 ) -replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/kubewatch/go.sum b/kubewatch/go.sum index 61698300d..60c4f39cc 100644 --- a/kubewatch/go.sum +++ b/kubewatch/go.sum @@ -719,8 +719,8 @@ github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= diff --git a/kubewatch/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/kubewatch/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/kubewatch/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/kubewatch/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/kubewatch/vendor/modules.txt b/kubewatch/vendor/modules.txt index 7c77746a7..92de57e06 100644 --- a/kubewatch/vendor/modules.txt +++ b/kubewatch/vendor/modules.txt @@ -211,7 +211,7 @@ github.com/cyphar/filepath-securejoin # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/constants github.com/devtron-labs/common-lib/git-manager/util @@ -1753,4 +1753,4 @@ upper.io/db.v3/postgresql # k8s.io/mount-utils => k8s.io/mount-utils v0.29.7 # k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.29.7 # k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.29.7 -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/lens/go.mod b/lens/go.mod index 2255d42be..64ad8fa28 100644 --- a/lens/go.mod +++ b/lens/go.mod @@ -59,4 +59,4 @@ require ( github.com/onsi/gomega v1.18.1 // indirect ) -replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 diff --git a/lens/go.sum b/lens/go.sum index bcc344fb3..479da65d3 100644 --- a/lens/go.sum +++ b/lens/go.sum @@ -22,8 +22,8 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWH github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 h1:W3nZCHpacaVQHmYHqbbXw3azzunAzKkf6VYujCUprQA= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= github.com/devtron-labs/protos v0.0.3-0.20240130061723-7b2e12ab0abb h1:CkfQQgZc950/hTPqtQSiHV2RmZgkBLGCzwR02FZYjAU= github.com/devtron-labs/protos v0.0.3-0.20240130061723-7b2e12ab0abb/go.mod h1:pjLjgoa1GzbkOkvbMyP4SAKsaiK7eG6GoQCNauG03JA= github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= diff --git a/lens/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go b/lens/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go index aaebee868..24e05eb36 100644 --- a/lens/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go +++ b/lens/vendor/github.com/devtron-labs/common-lib/utils/CommonUtils.go @@ -36,9 +36,13 @@ import ( var chars = []rune("abcdefghijklmnopqrstuvwxyz0123456789") const ( - DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" - DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" - DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DOCKER_REGISTRY_TYPE_DOCKERHUB = "docker-hub" + DEVTRON_SELF_POD_UID = "DEVTRON_SELF_POD_UID" + DEVTRON_SELF_POD_NAME = "DEVTRON_SELF_POD_NAME" + DEVTRON_SELF_DOWNWARD_API_VOLUME = "devtron-pod-info" + DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH = "/etc/devtron-pod-info" + POD_LABELS = "labels" + POD_ANNOTATIONS = "annotations" ) // Generates random string @@ -147,7 +151,6 @@ func GetSelfK8sPodName() string { return os.Getenv(DEVTRON_SELF_POD_NAME) } -// TODO: how to separate this service-wise ? var PgQueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "pg_query_duration_seconds", Help: "Duration of PG queries", diff --git a/lens/vendor/modules.txt b/lens/vendor/modules.txt index e6d5d029e..6cfcc2ca6 100644 --- a/lens/vendor/modules.txt +++ b/lens/vendor/modules.txt @@ -7,7 +7,7 @@ github.com/caarlos0/env # github.com/cespare/xxhash/v2 v2.2.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 -# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860 ## explicit; go 1.21 github.com/devtron-labs/common-lib/constants github.com/devtron-labs/common-lib/git-manager/util @@ -288,4 +288,4 @@ google.golang.org/protobuf/types/known/timestamppb # mellium.im/sasl v0.3.2 ## explicit; go 1.20 mellium.im/sasl -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250117085010-3d6ac9f53860