Skip to content

Commit

Permalink
switch to golang 1.23 and update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Sep 14, 2024
1 parent c61fb0e commit d61f275
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 170 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#############################################
# Build
#############################################
FROM --platform=$BUILDPLATFORM golang:1.22-alpine as build
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build

RUN apk upgrade --no-cache --force
RUN apk add --update build-base make git curl
Expand All @@ -23,7 +23,7 @@ RUN chmod +x entrypoint.sh
#############################################
# Test
#############################################
FROM gcr.io/distroless/static as test
FROM gcr.io/distroless/static AS test
USER 0:0
WORKDIR /app
COPY --from=build /go/src/github.com/webdevops/helm-azure-tpl/helm-azure-tpl .
Expand All @@ -33,7 +33,7 @@ RUN ["./helm-azure-tpl", "--help"]
#############################################
# final
#############################################
FROM mcr.microsoft.com/azure-cli:latest as final-azcli
FROM mcr.microsoft.com/azure-cli:latest AS final-azcli
WORKDIR /
COPY --from=test /app .
USER 1000:1000
Expand Down
8 changes: 4 additions & 4 deletions azuretpl/azure.network.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (e *AzureTemplateExecutor) azPublicIpAddress(resourceID string) (interface{

client, err := armnetwork.NewPublicIPAddressesClient(resourceInfo.Subscription, e.azureClient().GetCred(), e.azureClient().NewArmClientOptions())
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

pipAddress, err := client.Get(e.ctx, resourceInfo.ResourceGroup, resourceInfo.ResourceName, nil)
Expand Down Expand Up @@ -55,7 +55,7 @@ func (e *AzureTemplateExecutor) azPublicIpPrefixAddressPrefix(resourceID string)

client, err := armnetwork.NewPublicIPPrefixesClient(resourceInfo.Subscription, e.azureClient().GetCred(), e.azureClient().NewArmClientOptions())
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

pipAddress, err := client.Get(e.ctx, resourceInfo.ResourceGroup, resourceInfo.ResourceName, nil)
Expand Down Expand Up @@ -84,7 +84,7 @@ func (e *AzureTemplateExecutor) azVirtualNetworkAddressPrefixes(resourceID strin

client, err := armnetwork.NewVirtualNetworksClient(resourceInfo.Subscription, e.azureClient().GetCred(), e.azureClient().NewArmClientOptions())
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

vnet, err := client.Get(e.ctx, resourceInfo.ResourceGroup, resourceInfo.ResourceName, nil)
Expand Down Expand Up @@ -116,7 +116,7 @@ func (e *AzureTemplateExecutor) azVirtualNetworkSubnetAddressPrefixes(resourceID

client, err := armnetwork.NewVirtualNetworksClient(resourceInfo.Subscription, e.azureClient().GetCred(), e.azureClient().NewArmClientOptions())
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

vnet, err := client.Get(e.ctx, resourceInfo.ResourceGroup, resourceInfo.ResourceName, nil)
Expand Down
4 changes: 2 additions & 2 deletions azuretpl/azure.rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (e *AzureTemplateExecutor) azRoleDefinitionList(scope string, filter ...str
func (e *AzureTemplateExecutor) fetchAzureRoleDefinitions(scope string, filter string) ([]armauthorization.RoleDefinition, error) {
client, err := armauthorization.NewRoleDefinitionsClient(e.azureClient().GetCred(), e.azureClient().NewArmClientOptions())
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

listOpts := armauthorization.RoleDefinitionsClientListOptions{
Expand All @@ -78,7 +78,7 @@ func (e *AzureTemplateExecutor) fetchAzureRoleDefinitions(scope string, filter s
for pager.More() {
result, err := pager.NextPage(e.ctx)
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

for _, roleDefinition := range result.Value {
Expand Down
2 changes: 1 addition & 1 deletion azuretpl/azure.subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (e *AzureTemplateExecutor) azSubscription(subscriptionID ...string) (interf
return e.cacheResult(cacheKey, func() (interface{}, error) {
client, err := armsubscriptions.NewClient(e.azureClient().GetCred(), e.azureClient().NewArmClientOptions())
if err != nil {
return nil, fmt.Errorf(err.Error())
return nil, err
}

resource, err := client.Get(e.ctx, selectedSubscriptionId, nil)
Expand Down
81 changes: 40 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
module github.com/webdevops/helm-azure-tpl

go 1.22.0

toolchain go1.22.2
go 1.23

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0
github.com/Azure/azure-sdk-for-go/sdk/data/azappconfig v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v2 v2.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice v1.0.0
Expand All @@ -14,73 +12,74 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.3.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
github.com/Masterminds/sprig/v3 v3.2.3
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0
github.com/Masterminds/sprig/v3 v3.3.0
github.com/PaesslerAG/jsonpath v0.1.1
github.com/jessevdk/go-flags v1.5.0
github.com/microsoft/kiota-abstractions-go v1.6.0
github.com/microsoftgraph/msgraph-sdk-go v1.41.0
github.com/microsoftgraph/msgraph-sdk-go-core v1.1.0
github.com/jessevdk/go-flags v1.6.1
github.com/microsoft/kiota-abstractions-go v1.7.0
github.com/microsoftgraph/msgraph-sdk-go v1.48.0
github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/webdevops/go-common v0.0.0-20240512200714-ad1bee1eddb7
github.com/webdevops/go-common v0.0.0-20240914143308-98dd8416e15d
go.uber.org/zap v1.27.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.14.4
helm.sh/helm/v3 v3.16.1
sigs.k8s.io/yaml v1.4.0
)

require (
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/PaesslerAG/gval v1.2.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cjlapao/common-go v0.0.39 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/cjlapao/common-go v0.0.41 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/microsoft/kiota-authentication-azure-go v1.0.2 // indirect
github.com/microsoft/kiota-http-go v1.4.1 // indirect
github.com/microsoft/kiota-authentication-azure-go v1.1.0 // indirect
github.com/microsoft/kiota-http-go v1.4.5 // indirect
github.com/microsoft/kiota-serialization-form-go v1.0.0 // indirect
github.com/microsoft/kiota-serialization-json-go v1.0.7 // indirect
github.com/microsoft/kiota-serialization-json-go v1.0.8 // indirect
github.com/microsoft/kiota-serialization-multipart-go v1.0.0 // indirect
github.com/microsoft/kiota-serialization-text-go v1.0.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.3 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.14.0 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/remeh/sizedwaitgroup v1.0.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.57 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v1.0.6 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.opentelemetry.io/otel v1.26.0 // indirect
go.opentelemetry.io/otel/metric v1.26.0 // indirect
go.opentelemetry.io/otel/trace v1.26.0 // indirect
go.opentelemetry.io/otel v1.30.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
k8s.io/apimachinery v0.30.0 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
k8s.io/apimachinery v0.31.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
)
Loading

0 comments on commit d61f275

Please sign in to comment.