Skip to content

Commit

Permalink
Merge pull request #50 from terraform-providers/b-prevent-internal-an…
Browse files Browse the repository at this point in the history
…notations

meta: Treat internal k8s annotations as invalid
  • Loading branch information
radeksimko authored Aug 18, 2017
2 parents 8f91233 + ba1441b commit 824e220
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kubernetes/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func validateAnnotations(value interface{}, key string) (ws []string, es []error
es = append(es, fmt.Errorf("%s (%q) %s", key, k, e))
}
}

if isInternalKey(k) {
es = append(es, fmt.Errorf("%s: %q is internal Kubernetes annotation", key, k))
}
}
return
}
Expand Down

0 comments on commit 824e220

Please sign in to comment.