Skip to content

Commit

Permalink
add way to override image name for job
Browse files Browse the repository at this point in the history
  • Loading branch information
vsychov committed Aug 6, 2024
1 parent aa760fd commit 620a20b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Config struct {

type routingJobConfig struct {
Namespace nonEmptyStringDecoder `envconfig:"ROUTING_JOB_NAMESPACE"`
ImageName nonEmptyStringDecoder `envconfig:"ROUTING_JOB_IMAGE_NAME" default:"alpine/k8s"`
ServiceAccountName nonEmptyStringDecoder `envconfig:"ROUTING_SERVICE_ACCOUNT_NAME"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/k8s/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (k8s *K8s) AddRouteForFloatIp(node *v1.Node, ip string) {
ImagePullPolicy: v1.PullAlways,
SecurityContext: &jobSecurityContext,
Name: jobName,
Image: "alpine/k8s:" + k8s.getK8sServerVersion(),
Image: string(k8s.Config.RoutingJob.ImageName) + ":" + k8s.getK8sServerVersion(),
//ip route replace default via 10.19.0.1 dev eth0
Command: []string{
"/bin/sh",
Expand Down

0 comments on commit 620a20b

Please sign in to comment.