mirror of https://github.com/kubernetes/kops.git
Merge pull request #13592 from hakman/fix_metadata_obj_type
Fix unexpected type for object metadata when using gossip DNS
This commit is contained in:
commit
ec7545f30a
|
|
@ -51,7 +51,7 @@ func KubeObjectToApplyYAML(data runtime.Object) (string, error) {
|
||||||
// Remove metadata.creationTimestamp (can't be applied, shouldn't be specified)
|
// Remove metadata.creationTimestamp (can't be applied, shouldn't be specified)
|
||||||
metadataObj, found := jsonObj["metadata"]
|
metadataObj, found := jsonObj["metadata"]
|
||||||
if found {
|
if found {
|
||||||
if metadata, ok := metadataObj.(map[interface{}]interface{}); ok {
|
if metadata, ok := metadataObj.(map[string]interface{}); ok {
|
||||||
delete(metadata, "creationTimestamp")
|
delete(metadata, "creationTimestamp")
|
||||||
} else {
|
} else {
|
||||||
klog.Warningf("unexpected type for object metadata: %T", metadataObj)
|
klog.Warningf("unexpected type for object metadata: %T", metadataObj)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue