Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #553 from rfranzke/fix/gcp-machineclass
Browse files Browse the repository at this point in the history
Rename introduced labels to resourceLabels as labels is already taken
  • Loading branch information
rfranzke authored Jan 15, 2020
2 parents 6c11c73 + aa27c54 commit b685f58
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ kind: Secret
metadata:
name: {{ $machineClass.name }}
namespace: {{ $.Release.Namespace }}
{{- if $machineClass.labels }}
{{- if $machineClass.resourceLabels }}
labels:
{{ toYaml $machineClass.labels | indent 4 }}
{{ toYaml $machineClass.resourceLabels | indent 4 }}
{{- end }}
type: Opaque
data:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
machineClasses:
- name: class-1
# labels:
# resourceLabels:
# foo: bar
region: europe-west1
zone: europe-west1-b
Expand Down
2 changes: 1 addition & 1 deletion controllers/provider-gcp/pkg/controller/worker/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (w *workerDelegate) generateMachineConfig(ctx context.Context) error {
})

machineClassSpec["name"] = className
machineClassSpec["labels"] = map[string]string{
machineClassSpec["resourceLabels"] = map[string]string{
v1beta1constants.GardenPurpose: genericworkeractuator.GardenPurposeMachineClass,
}
machineClassSpec["secret"].(map[string]interface{})[gcp.ServiceAccountJSONMCM] = string(machineClassSecretData[machinev1alpha1.GCPServiceAccountJSON])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ func useDefaultMachineClass(def map[string]interface{}, key string, value interf

func addNameAndSecretToMachineClass(class map[string]interface{}, serviceAccountJSON, name string) {
class["name"] = name
class["labels"] = map[string]string{
class["resourceLabels"] = map[string]string{
v1beta1constants.GardenPurpose: genericworkeractuator.GardenPurposeMachineClass,
}
class["secret"].(map[string]interface{})[gcp.ServiceAccountJSONMCM] = serviceAccountJSON
Expand Down

0 comments on commit b685f58

Please sign in to comment.