Skip to content

Commit

Permalink
rename package constant to images
Browse files Browse the repository at this point in the history
  • Loading branch information
hisarbalik committed Dec 16, 2024
1 parent c6e07c3 commit 0841eb6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/constant/images.go → internal/images/images.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is generated by "make generate".
// Don't edit, update .env file and run make target generate.

package constant
package images

const (
DefaultFluentBitExporterImage = "europe-docker.pkg.dev/kyma-project/prod/directory-size-exporter:v20241212-e4adf27f"
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func main() {
}

func generateCommonConstants(data map[string]string) {
f, err := os.Create("./internal/constant/images.go")
f, err := os.Create("./internal/images/images.go")
if err != nil {
log.Fatal(err)
}
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import (
telemetryv1beta1 "github.com/kyma-project/telemetry-manager/apis/telemetry/v1beta1"
"github.com/kyma-project/telemetry-manager/controllers/operator"
telemetrycontrollers "github.com/kyma-project/telemetry-manager/controllers/telemetry"
"github.com/kyma-project/telemetry-manager/internal/constant"
"github.com/kyma-project/telemetry-manager/internal/featureflags"
"github.com/kyma-project/telemetry-manager/internal/images"
"github.com/kyma-project/telemetry-manager/internal/overrides"
"github.com/kyma-project/telemetry-manager/internal/reconciler/telemetry"
"github.com/kyma-project/telemetry-manager/internal/resources/selfmonitor"
Expand Down Expand Up @@ -130,10 +130,10 @@ func run() error {
flag.StringVar(&highPriorityClassName, "high-priority-class-name", "", "High priority class name used by managed DaemonSets")
flag.StringVar(&normalPriorityClassName, "normal-priority-class-name", "", "Normal priority class name used by managed Deployments")

flag.StringVar(&fluentBitExporterImage, "fluent-bit-exporter-image", constant.DefaultFluentBitExporterImage, "Image for exporting fluent bit filesystem usage")
flag.StringVar(&fluentBitImage, "fluent-bit-image", constant.DefaultFluentBitImage, "Image for fluent-bit")
flag.StringVar(&otelCollectorImage, "otel-collector-image", constant.DefaultOTelCollectorImage, "Image for OpenTelemetry Collector")
flag.StringVar(&selfMonitorImage, "self-monitor-image", constant.DefaultSelfMonitorImage, "Image for self-monitor")
flag.StringVar(&fluentBitExporterImage, "fluent-bit-exporter-image", images.DefaultFluentBitExporterImage, "Image for exporting fluent bit filesystem usage")
flag.StringVar(&fluentBitImage, "fluent-bit-image", images.DefaultFluentBitImage, "Image for fluent-bit")
flag.StringVar(&otelCollectorImage, "otel-collector-image", images.DefaultOTelCollectorImage, "Image for OpenTelemetry Collector")
flag.StringVar(&selfMonitorImage, "self-monitor-image", images.DefaultSelfMonitorImage, "Image for self-monitor")

flag.Parse()

Expand Down
4 changes: 2 additions & 2 deletions test/testkit/mocks/backend/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"

"github.com/kyma-project/telemetry-manager/internal/constant"
"github.com/kyma-project/telemetry-manager/internal/images"

Check failure on line 9 in test/testkit/mocks/backend/deployment.go

View workflow job for this annotation

GitHub Actions / unit-tests

"github.com/kyma-project/telemetry-manager/internal/images" imported as constant and not used
"github.com/kyma-project/telemetry-manager/test/testkit"
kitk8s "github.com/kyma-project/telemetry-manager/test/testkit/k8s"
)
Expand Down Expand Up @@ -82,7 +82,7 @@ func (d *Deployment) containers() []corev1.Container {
containers := []corev1.Container{
{
Name: "otel-collector",
Image: constant.DefaultOTelCollectorImage,
Image: images.DefaultOTelCollectorImage,

Check failure on line 85 in test/testkit/mocks/backend/deployment.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: images
Args: []string{"--config=/etc/collector/config.yaml"},
SecurityContext: &corev1.SecurityContext{
RunAsUser: ptr.To[int64](101),
Expand Down

0 comments on commit 0841eb6

Please sign in to comment.