Skip to content

Commit 5cd8db5

Browse files
authored
Merge pull request #140 from equinor/master
Release radix-cost-allocation
2 parents b99c0ee + c2b2c78 commit 5cd8db5

File tree

8 files changed

+174
-161
lines changed

8 files changed

+174
-161
lines changed

.github/workflows/build-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- name: "playground"
2626
ref: "refs/heads/release"
27-
acr-name: "radixdev"
27+
acr-name: "radixplayground"
2828
client-id: "4b607a0a-b4f7-4918-8586-0f1ee8a69d5b"
2929
subscription-id: "16ede44b-1f74-40a5-b428-46cca9a5741b"
3030

.github/workflows/deploy-database.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
with:
6868
connection-string: ${{env.connection}}
6969
path: './azure-infrastructure/createSchema.sql'
70+
arguments: '-v RADIX_ZONE=${{matrix.target.name}}'
7071

7172
- uses: azure/[email protected]
7273
if: matrix.target.ref == github.ref

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
FROM docker.io/golang:1.22-alpine3.20 AS builder
1+
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22-alpine3.20 AS builder
2+
3+
ARG TARGETARCH
24

35
ENV CGO_ENABLED=0 \
4-
GOOS=linux
6+
GOOS=linux \
7+
GOARCH=$TARGETARCH
58

69
WORKDIR /src
710

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@ VERSION=latest
33
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
44
IMAGE_NAME=$(DOCKER_REGISTRY)/radix-cost-allocation:$(BRANCH)-$(VERSION)
55

6+
.PHONY: build
67
build:
78
docker build -t $(IMAGE_NAME) .
89

9-
push:
10+
.PHONY: push
11+
push: build
1012
az acr login -n $(DOCKER_REGISTRY)
1113
docker push $(IMAGE_NAME)
1214

15+
.PHONY: pushmultiplatform
16+
pushmultiplatform:
17+
az acr login -n $(DOCKER_REGISTRY)
18+
docker buildx build --platform=linux/amd64,linux/arm64 -t $(IMAGE_NAME) --push .
19+
1320
.PHONY: test
1421
test:
1522
go test -cover `go list ./...`

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![build workflow](https://github.com/equinor/radix-cost-allocation/actions/workflows/build-push.yml/badge.svg)
1+
![build workflow](https://github.com/equinor/radix-cost-allocation/actions/workflows/build-push.yml/badge.svg) [![SCM Compliance](https://scm-compliance-api.radix.equinor.com/repos/equinor/radix-cost-allocation/badge)](https://developer.equinor.com/governance/scm-policy/)
22

33
# RADIX-COST-ALLOCATION
44

@@ -12,12 +12,6 @@ We use arm template and github action to create azure resources
1212
The SQL Server database and objects are deployed on push to master and release branch.
1313
All SQL scripts on azure-infrastructure must be idempotent.
1414

15-
Note: The Github Workflow is not allowed to create new external users, so you must run it locally. Se more here: https://github.com/equinor/radix-vulnerability-scanner/issues/54
16-
Workaround:
17-
```sh
18-
sqlcmd -S ${SERVER_NAME}.database.windows.net -d ${DATABASE_NAME} -G --variables RADIX_ZONE=${RADIX_ZONE} -i createSchema.sql
19-
```
20-
2115
## Deploy to cluster
2216

2317
Installation on cluster is handled by flux through [flux repo](https://github.com/equinor/radix-flux).

charts/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: radix-cost-allocation
33
description: Pull cost data from containers and push to sql server
44
kubeVersion: ">=1.24.0"
5-
appVersion: 1.1.1
6-
version: 1.2.1
5+
appVersion: 1.2.2
6+
version: 1.2.2
77
sources:
88
- https://github.com/equinor/radix-cost-allocation
99
maintainers:

go.mod

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@ go 1.22.0
55
toolchain go1.22.5
66

77
require (
8-
github.com/equinor/radix-operator v1.57.1
8+
github.com/equinor/radix-operator v1.68.1
99
github.com/golang/mock v1.6.0
10-
github.com/microsoft/go-mssqldb v1.7.2
10+
github.com/microsoft/go-mssqldb v1.8.0
1111
github.com/pkg/errors v0.9.1
1212
github.com/robfig/cron/v3 v3.0.1
1313
github.com/rs/zerolog v1.33.0
1414
github.com/stretchr/testify v1.9.0
1515
github.com/vrischmann/envconfig v1.3.0
16-
golang.org/x/sync v0.7.0
17-
k8s.io/api v0.30.1
18-
k8s.io/apimachinery v0.30.1
19-
k8s.io/client-go v0.30.1
16+
golang.org/x/sync v0.10.0
17+
k8s.io/api v0.31.0
18+
k8s.io/apimachinery v0.31.0
19+
k8s.io/client-go v0.31.0
2020
)
2121

2222
require (
23-
dario.cat/mergo v1.0.0 // indirect
24-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect
25-
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect
26-
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect
27-
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
23+
dario.cat/mergo v1.0.1 // indirect
24+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 // indirect
25+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect
26+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
27+
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
2828
github.com/beorn7/perks v1.0.1 // indirect
29-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
29+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3030
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
31-
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
32-
github.com/equinor/radix-common v1.9.2 // indirect
33-
github.com/evanphx/json-patch v5.8.1+incompatible // indirect
31+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
32+
github.com/equinor/radix-common v1.9.4 // indirect
3433
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
35-
github.com/expr-lang/expr v1.15.8 // indirect
34+
github.com/expr-lang/expr v1.16.9 // indirect
3635
github.com/fsnotify/fsnotify v1.7.0 // indirect
37-
github.com/go-logr/logr v1.4.1 // indirect
38-
github.com/go-openapi/jsonpointer v0.20.2 // indirect
39-
github.com/go-openapi/jsonreference v0.20.4 // indirect
40-
github.com/go-openapi/swag v0.22.7 // indirect
36+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
37+
github.com/go-logr/logr v1.4.2 // indirect
38+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
39+
github.com/go-openapi/jsonreference v0.21.0 // indirect
40+
github.com/go-openapi/swag v0.23.0 // indirect
4141
github.com/gogo/protobuf v1.3.2 // indirect
42-
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
42+
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
4343
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
4444
github.com/golang-sql/sqlexp v0.1.0 // indirect
4545
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -51,7 +51,8 @@ require (
5151
github.com/imdario/mergo v0.3.16 // indirect
5252
github.com/josharian/intern v1.0.0 // indirect
5353
github.com/json-iterator/go v1.1.12 // indirect
54-
github.com/kedacore/keda/v2 v2.13.1 // indirect
54+
github.com/kedacore/keda/v2 v2.15.1 // indirect
55+
github.com/klauspost/compress v1.17.9 // indirect
5556
github.com/kylelemons/godebug v1.1.0 // indirect
5657
github.com/mailru/easyjson v0.7.7 // indirect
5758
github.com/mattn/go-colorable v0.1.13 // indirect
@@ -61,32 +62,34 @@ require (
6162
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
6263
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
6364
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
64-
github.com/prometheus/client_golang v1.19.0 // indirect
65+
github.com/prometheus/client_golang v1.20.2 // indirect
6566
github.com/prometheus/client_model v0.6.1 // indirect
66-
github.com/prometheus/common v0.53.0 // indirect
67-
github.com/prometheus/procfs v0.12.0 // indirect
67+
github.com/prometheus/common v0.55.0 // indirect
68+
github.com/prometheus/procfs v0.15.1 // indirect
6869
github.com/spf13/pflag v1.0.5 // indirect
69-
golang.org/x/crypto v0.22.0 // indirect
70-
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
71-
golang.org/x/net v0.24.0 // indirect
72-
golang.org/x/oauth2 v0.19.0 // indirect
73-
golang.org/x/sys v0.19.0 // indirect
74-
golang.org/x/term v0.19.0 // indirect
75-
golang.org/x/text v0.14.0 // indirect
76-
golang.org/x/time v0.5.0 // indirect
70+
github.com/x448/float16 v0.8.4 // indirect
71+
golang.org/x/crypto v0.31.0 // indirect
72+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
73+
golang.org/x/net v0.28.0 // indirect
74+
golang.org/x/oauth2 v0.22.0 // indirect
75+
golang.org/x/sys v0.28.0 // indirect
76+
golang.org/x/term v0.27.0 // indirect
77+
golang.org/x/text v0.21.0 // indirect
78+
golang.org/x/time v0.6.0 // indirect
7779
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
78-
google.golang.org/protobuf v1.33.0 // indirect
80+
google.golang.org/protobuf v1.34.2 // indirect
81+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7982
gopkg.in/inf.v0 v0.9.1 // indirect
8083
gopkg.in/yaml.v2 v2.4.0 // indirect
8184
gopkg.in/yaml.v3 v3.0.1 // indirect
82-
k8s.io/apiextensions-apiserver v0.30.1 // indirect
83-
k8s.io/klog/v2 v2.120.1 // indirect
84-
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
85-
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
86-
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902 // indirect
87-
sigs.k8s.io/controller-runtime v0.18.2 // indirect
85+
k8s.io/apiextensions-apiserver v0.31.0 // indirect
86+
k8s.io/klog/v2 v2.130.1 // indirect
87+
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
88+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
89+
knative.dev/pkg v0.0.0-20240805063731-c88d5dad9653 // indirect
90+
sigs.k8s.io/controller-runtime v0.19.0 // indirect
8891
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
89-
sigs.k8s.io/secrets-store-csi-driver v1.4.0 // indirect
92+
sigs.k8s.io/secrets-store-csi-driver v1.4.5 // indirect
9093
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
9194
sigs.k8s.io/yaml v1.4.0 // indirect
9295
)

0 commit comments

Comments
 (0)