Skip to content

Commit e2ca500

Browse files
kerenlahavI065450
andauthored
Bump go version (#591)
--------- Co-authored-by: i065450 <naama.solomon@sap.com>
1 parent e563459 commit e2ca500

File tree

9 files changed

+23
-8
lines changed

9 files changed

+23
-8
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515

16-
- name: Set up Go 1.25.3
16+
- name: Set up Go 1.25.5
1717
uses: actions/setup-go@v2
1818
with:
19-
go-version: 1.25.3
19+
go-version: 1.25.5
2020

2121
- name: Check out code into the Go module directory
2222
uses: actions/checkout@v2

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM --platform=$BUILDPLATFORM golang:1.25.3-alpine3.22 as builder
2+
FROM --platform=$BUILDPLATFORM golang:1.25.5-alpine3.23 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests
@@ -21,7 +21,7 @@ ARG TARGETOS TARGETARCH
2121
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GO111MODULE=on go build -a -o manager main.go
2222

2323

24-
FROM alpine:3.22.2
24+
FROM alpine:3.23
2525

2626
WORKDIR /
2727
COPY --from=builder /workspace/manager .

client/sm/client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const (
4040
originatingIdentityHeader = "X-Originating-Identity"
4141
)
4242

43+
var AppVersion string
44+
4345
// Client should be implemented by SM clients
4446
//
4547
//go:generate counterfeiter . Client
@@ -446,6 +448,8 @@ func (client *serviceManagerClient) callWithUser(method string, smpath string, b
446448
return nil, err
447449
}
448450
req.Header.Add("Content-Type", "application/json")
451+
req.Header.Add("client-name", "sap-btp-service-operator")
452+
req.Header.Add("client-version", AppVersion)
449453
if len(user) > 0 {
450454
req.Header.Add(originatingIdentityHeader, user)
451455
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/SAP/sap-btp-service-operator
22

3-
go 1.25.3
3+
go 1.25.5
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.3.0
@@ -69,7 +69,7 @@ require (
6969
golang.org/x/text v0.31.0 // indirect
7070
golang.org/x/time v0.9.0 // indirect
7171
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
72-
google.golang.org/protobuf v1.36.6 // indirect
72+
google.golang.org/protobuf v1.36.11 // indirect
7373
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7474
gopkg.in/inf.v0 v0.9.1 // indirect
7575
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi
234234
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
235235
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
236236
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
237+
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
238+
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
237239
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
238240
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
239241
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

internal/utils/condition_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func getReadyCondition(object common.SAPBTPResource) metav1.Condition {
270270
reason = common.Provisioned
271271
}
272272

273-
return metav1.Condition{Type: common.ConditionReady, Status: status, Reason: reason}
273+
return metav1.Condition{Type: common.ConditionReady, Status: status, Reason: reason, ObservedGeneration: object.GetGeneration()}
274274
}
275275

276276
func getLastObservedGen(object common.SAPBTPResource) int64 {

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"os"
2323
"time"
2424

25+
"github.com/SAP/sap-btp-service-operator/client/sm"
2526
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
2627

2728
"k8s.io/apimachinery/pkg/labels"
@@ -84,6 +85,9 @@ func main() {
8485

8586
ctrl.SetLogger(zap.New(zap.UseDevMode(loggerUseDevMode)))
8687

88+
sm.AppVersion = os.Getenv("APP_VERSION")
89+
setupLog.Info("starting btp-service-operator", "version", sm.AppVersion)
90+
8791
mgrOptions := ctrl.Options{
8892
Scheme: scheme,
8993
Metrics: server.Options{

sapbtp-operator-charts/templates/custom-ca-secret.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ metadata:
99
type: Opaque
1010
data:
1111
ca-certificates.crt: |
12+
{{- $certs := list }}
1213
{{- range .Values.manager.customCACerts }}
13-
{{ . | nindent 4 }}
14+
{{- $certs = append $certs (b64dec .) }}
1415
{{- end }}
16+
{{- $certs | join "\n" | b64enc | nindent 4 }}
1517
{{- end }}

sapbtp-operator-charts/templates/deployment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ spec:
8484
- --logger_use_dev_mode={{.Values.manager.logger_use_dev_mode}}
8585
command:
8686
- /manager
87+
env:
88+
- name: APP_VERSION
89+
value: "{{ .Chart.AppVersion }}"
8790
envFrom:
8891
- configMapRef:
8992
name: sap-btp-operator-config

0 commit comments

Comments
 (0)