Skip to content

Commit

Permalink
Add batchstatus rules (#136)
Browse files Browse the repository at this point in the history
* Rearranged files

* Updated version

* Updated version

* Updated version
  • Loading branch information
satr authored Jul 5, 2024
1 parent e946fa7 commit 3c16c1d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.22.1

require (
github.com/equinor/radix-common v1.9.2
github.com/equinor/radix-operator v1.55.3
github.com/equinor/radix-operator v1.57.1
github.com/go-git/go-git/v5 v5.12.0
github.com/golang/mock v1.6.0
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/equinor/radix-common v1.9.2 h1:pOYN/mSAoPe6KO/Nvudfd5DUETbLv4nLTLzFPr62ADw=
github.com/equinor/radix-common v1.9.2/go.mod h1:ekn86U68NT4ccSdt3GT+ukpiclzfuhr96a7zBJKv/jw=
github.com/equinor/radix-operator v1.55.3 h1:pOZoKruOBOrkDOulBBRySgxnBK+W8Qub/iU5SBWqHO8=
github.com/equinor/radix-operator v1.55.3/go.mod h1:0KwN3ZEACZWhHrJZIuSxVYVeHhFgUBaRoeDyGiAljRs=
github.com/equinor/radix-operator v1.57.1 h1:5nhKdF13MZ9oooxr5+n3OOXMUrr7g1U9GGSeKysfcq0=
github.com/equinor/radix-operator v1.57.1/go.mod h1:zCdAiP/wxyvlUO4qGoJuLW3O+ZSt9kTyHMnjmsR3fCU=
github.com/evanphx/json-patch v5.8.1+incompatible h1:2toJaoe7/rNa1zpeQx0UnVEjqk6z2ecyA20V/zg8vTU=
github.com/evanphx/json-patch v5.8.1+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
Expand Down
4 changes: 2 additions & 2 deletions pkg/pipeline/radix_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package pipeline
import (
"context"

"github.com/equinor/radix-operator/pipeline-runner/steps"
"github.com/equinor/radix-operator/pkg/apis/pipeline/application"
v1 "github.com/equinor/radix-operator/pkg/apis/radix/v1"
"github.com/equinor/radix-tekton/pkg/utils/configmap"
)

func (ctx *pipelineContext) createRadixApplicationFromContent(configFileContent string) (*v1.RadixApplication, error) {
return steps.CreateRadixApplication(context.TODO(), ctx.radixClient, ctx.env.GetDNSConfig(), configFileContent)
return application.CreateRadixApplication(context.TODO(), ctx.radixClient, ctx.env.GetDNSConfig(), configFileContent)
}

func (ctx *pipelineContext) createRadixApplicationFromConfigMap() (*v1.RadixApplication, error) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/pipeline/run_pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"strings"
"time"

"github.com/equinor/radix-common/utils/pointers"
operatorDefaults "github.com/equinor/radix-operator/pkg/apis/defaults"
"github.com/equinor/radix-operator/pkg/apis/kube"
radixv1 "github.com/equinor/radix-operator/pkg/apis/radix/v1"
Expand Down Expand Up @@ -151,7 +152,7 @@ func (ctx *pipelineContext) buildPipelineRun(pipeline *pipelinev1.Pipeline, targ
func (ctx *pipelineContext) buildPipelineRunPodTemplate() *pod.Template {
podTemplate := pod.Template{
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utils.BoolPtr(true),
RunAsNonRoot: pointers.Ptr(true),
},
NodeSelector: map[string]string{
corev1.LabelArchStable: "amd64",
Expand Down
4 changes: 2 additions & 2 deletions pkg/pipeline/run_pipelines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"testing"

"github.com/equinor/radix-common/utils/pointers"
pipelineDefaults "github.com/equinor/radix-operator/pipeline-runner/model/defaults"
"github.com/equinor/radix-operator/pkg/apis/config/dnsalias"
radixv1 "github.com/equinor/radix-operator/pkg/apis/radix/v1"
Expand Down Expand Up @@ -87,15 +88,14 @@ func Test_RunPipeline_TaskRunTemplate(t *testing.T) {
ServiceAccountName: utils.GetSubPipelineServiceAccountName(env1),
PodTemplate: &pod.Template{
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utils.BoolPtr(true),
RunAsNonRoot: pointers.Ptr(true),
},
NodeSelector: map[string]string{
corev1.LabelArchStable: "amd64",
corev1.LabelOSStable: "linux",
},
},
}
// actual := l.Items[0].Spec.TaskRunTemplate.ServiceAccountName
assert.Equal(t, expected, l.Items[0].Spec.TaskRunTemplate)
}

Expand Down

0 comments on commit 3c16c1d

Please sign in to comment.