File tree 3 files changed +19
-6
lines changed
3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
1
.git *
2
2
examples /**
3
+
4
+ charts /
5
+ * .yaml
Original file line number Diff line number Diff line change @@ -117,6 +117,10 @@ func watchForPersistentVolumeClaims(watchNamespace string) {
117
117
if ! provisionedByAwsEbs (newOne ) {
118
118
return
119
119
}
120
+ if newOne .Spec .VolumeName == "" {
121
+ log .Debugln ("Volume not yet created, skipping" )
122
+ return
123
+ }
120
124
// TODO: Handle removed tags
121
125
log .Infoln ("Need to reconcile tags" )
122
126
volumeID , tags , err := processPersistentVolumeClaim (newOne )
@@ -184,13 +188,11 @@ func buildTags(pvc *corev1.PersistentVolumeClaim) map[string]string {
184
188
}
185
189
186
190
func isValidTagName (name string ) bool {
187
- if strings .HasPrefix (name , "kubernetes.io" ) {
191
+ if strings .HasPrefix (strings . ToLower ( name ) , "kubernetes.io" ) {
188
192
return false
189
- }
190
- if name == "Name" {
193
+ } else if strings .ToLower (name ) == "name" {
191
194
return false
192
- }
193
- if name == "KubernetesCluster" {
195
+ } else if strings .ToLower (name ) == "kubernetescluster" {
194
196
return false
195
197
}
196
198
Original file line number Diff line number Diff line change @@ -94,11 +94,19 @@ func main() {
94
94
}
95
95
96
96
if defaultTagsString != "" {
97
+ log .Debugln ("defaultTagsString:" , defaultTagsString )
97
98
err := json .Unmarshal ([]byte (defaultTagsString ), & defaultTags )
98
99
if err != nil {
99
- log .Fatalln ("default-tags are not valid json key/value pairs" )
100
+ log .Fatalln ("default-tags are not valid json key/value pairs:" , err )
100
101
}
101
102
}
103
+ log .Infoln ("Default Tags:" , defaultTags )
104
+
105
+ if watchNamespace == "" {
106
+ log .Infoln ("Watching namespace:" , watchNamespace )
107
+ } else {
108
+ log .Infoln ("Watching all namespaces" )
109
+ }
102
110
103
111
// Parse AWS_REGION environment variable.
104
112
if len (region ) == 0 {
You can’t perform that action at this time.
0 commit comments