Skip to content

Commit

Permalink
Merge pull request #208 from gianlucam76/release-0.9
Browse files Browse the repository at this point in the history
Release 0.9
  • Loading branch information
gianlucam76 committed Apr 24, 2023
2 parents 78b7d30 + b8adfed commit f93464b
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'main'
- 'dev'
pull_request:
types: opened
types: [opened, edited, reopened]


jobs:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ARCH ?= amd64
OS ?= $(shell uname -s | tr A-Z a-z)
K8S_LATEST_VER ?= $(shell curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
export CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME)
TAG ?= v0.9.0
TAG ?= v0.9.1

# Get cluster-api version and build ldflags
clusterapi := $(shell go list -m sigs.k8s.io/cluster-api)
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: projectsveltos/addon-manager-amd64:v0.9.0
- image: projectsveltos/addon-manager-amd64:v0.9.1
name: manager
2 changes: 1 addition & 1 deletion controllers/clustersummary_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (r *ClusterSummaryReconciler) reconcileDelete(

err = r.removeResourceSummary(ctx, clusterSummaryScope, logger)
if err != nil {
logger.V(logs.LogInfo).Info("failed to remove ResourceSummary.")
logger.V(logs.LogInfo).Error(err, "failed to remove ResourceSummary.")
return reconcile.Result{Requeue: true, RequeueAfter: deleteRequeueAfter}, nil
}

Expand Down
11 changes: 6 additions & 5 deletions controllers/handlers_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@ func deployResources(ctx context.Context, c client.Client,
var remoteResourceReports []configv1alpha1.ResourceReport
localResourceReports, remoteResourceReports, err = deployReferencedObjects(ctx, c, remoteRestConfig,
clusterSummary, featureHandler, logger)
if err != nil {
return err
}

clusterProfileOwnerRef, err := configv1alpha1.GetClusterProfileOwnerReference(clusterSummary)
// Irrespective of error, update deployed gvks. Otherwise cleanup won't happen in case
gvkErr := updateDeployedGroupVersionKind(ctx, clusterSummary, localResourceReports, remoteResourceReports, logger)
if err != nil {
return err
}
if gvkErr != nil {
return gvkErr
}

err = updateDeployedGroupVersionKind(ctx, clusterSummary, localResourceReports, remoteResourceReports, logger)
clusterProfileOwnerRef, err := configv1alpha1.GetClusterProfileOwnerReference(clusterSummary)
if err != nil {
return err
}
Expand Down
9 changes: 4 additions & 5 deletions controllers/handlers_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,22 +478,21 @@ func deployReferencedObjects(ctx context.Context, c client.Client, remoteConfig
localConfig.Impersonate = rest.ImpersonationConfig{
UserName: fmt.Sprintf("system:serviceaccount:%s:%s", adminNamespace, adminName),
}
logger.Info("MGIANLUC")
}
tmpResourceReports, err = deployObjects(ctx, c, localConfig, objectsToDeployLocally, clusterSummary,
mgtmResources, logger)
localReports = append(localReports, tmpResourceReports...)
if err != nil {
return nil, nil, err
return localReports, nil, err
}
localReports = append(localReports, tmpResourceReports...)

// Deploy all resources that need to be deployed in the managed cluster
tmpResourceReports, err = deployObjects(ctx, remoteClient, remoteConfig, objectsToDeployRemotely, clusterSummary,
mgtmResources, logger)
remoteReports = append(remoteReports, tmpResourceReports...)
if err != nil {
return nil, nil, err
return localReports, remoteReports, err
}
remoteReports = append(remoteReports, tmpResourceReports...)

return localReports, remoteReports, nil
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/template_instantiation.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func instantiateTemplateValues(ctx context.Context, config *rest.Config, c clien
}

templateName := getTemplateName(clusterNamespace, clusterName, requestorName)
tmpl, err := template.New(templateName).Funcs(sprig.FuncMap()).Parse(values)
tmpl, err := template.New(templateName).Option("missingkey=error").Funcs(sprig.FuncMap()).Parse(values)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.5
github.com/pkg/errors v0.9.1
github.com/projectsveltos/libsveltos v0.9.0
github.com/projectsveltos/libsveltos v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/spf13/pflag v1.0.5
golang.org/x/text v0.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg
github.com/poy/onpar v0.0.0-20200406201722-06f95a1c68e8/go.mod h1:nSbFQvMj97ZyhFRSJYtut+msi4sOY6zJDGCdSc+/rZU=
github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY=
github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg=
github.com/projectsveltos/libsveltos v0.9.0 h1:JYOlEtnFTDqmozNTz7hmuRAW1+VrFlu++ZPZwPv39Rk=
github.com/projectsveltos/libsveltos v0.9.0/go.mod h1:10UR0S+rA8NdP/X8IPWKv1tb0CL4gOOguT2JCXyL/18=
github.com/projectsveltos/libsveltos v0.9.1 h1:6y6oq2FGlDlQ9/6vyA7tzWC6lq0B3X74kDbpSsV8Y5E=
github.com/projectsveltos/libsveltos v0.9.1/go.mod h1:10UR0S+rA8NdP/X8IPWKv1tb0CL4gOOguT2JCXyL/18=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
Expand Down
2 changes: 1 addition & 1 deletion manifest/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ spec:
- --v=5
command:
- /manager
image: projectsveltos/addon-manager-amd64:v0.9.0
image: projectsveltos/addon-manager-amd64:v0.9.1
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion pkg/drift-detection/drift-detection-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ spec:
- --run-mode=do-not-send-updates
command:
- /manager
image: projectsveltos/drift-detection-manager-amd64:v0.9.0
image: projectsveltos/drift-detection-manager-amd64:v0.9.1
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion pkg/drift-detection/drift-detection-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ spec:
- --run-mode=do-not-send-updates
command:
- /manager
image: projectsveltos/drift-detection-manager-amd64:v0.9.0
image: projectsveltos/drift-detection-manager-amd64:v0.9.1
livenessProbe:
httpGet:
path: /healthz
Expand Down

0 comments on commit f93464b

Please sign in to comment.