Field names are case-sensitive again

There was a regression in apimachinery which meant that kubernetes
tolerated field names with incorrect case.  Upstream bug is
https://github.com/kubernetes/kubernetes/issues/64612

Syncing up with latest kubernetes will mean we get the same breaking
change as kubernetes has/had.  It should only affect people that are
manually building YAML / JSON.

Added as a significant item to release notes.
This commit is contained in:
Justin Santa Barbara 2018-09-23 19:20:24 -04:00
parent b0507b42f5
commit e6bf6b9f32
4 changed files with 18 additions and 11 deletions

View File

@ -2,9 +2,16 @@
# Significant changes # Significant changes
* kops will attempt to remove NLBs (also known as ELB v2) that are tagged as * kops will attempt to remove NLBs (also known as ELB v2) that are
created by the cluster. Please double-check the preview from `kops delete tagged as created by the cluster. Please double-check the preview
cluster` before allowing deletion. from `kops delete cluster` before allowing deletion.
* JSON & YAML field names in the kops objects are case-sensitive.
This was a regression across the kubernetes API libraries as
observed [kubernetes#64612](https://github.com/kubernetes/kubernetes/issues/64612).
Please double-check that you are using the correct field names if
you are constructing YAML / JSON outside of kops.
# Required Actions # Required Actions

View File

@ -213,8 +213,8 @@ func AWSNodeUpTemplate(ig *kops.InstanceGroup) (string, error) {
} }
} }
for _, UserDataInfo := range ig.Spec.AdditionalUserData { for _, d := range ig.Spec.AdditionalUserData {
err = writeUserDataPart(mimeWriter, UserDataInfo.Name, UserDataInfo.Type, []byte(UserDataInfo.Content)) err = writeUserDataPart(mimeWriter, d.Name, d.Type, []byte(d.Content))
if err != nil { if err != nil {
return "", err return "", err
} }

View File

@ -292,7 +292,7 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersadditionaluserda
Mime-Version: 1.0 Mime-Version: 1.0
#!/bin/sh #!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt echo "master: The time is now $(date -R)!" | tee /root/output.txt
--MIMEBOUNDARY-- --MIMEBOUNDARY--
@ -521,6 +521,6 @@ Resources.AWSAutoScalingLaunchConfigurationnodesadditionaluserdataexamplecom.Pro
Mime-Version: 1.0 Mime-Version: 1.0
#!/bin/sh #!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt echo "nodes: The time is now $(date -R)!" | tee /root/output.txt
--MIMEBOUNDARY-- --MIMEBOUNDARY--

View File

@ -63,12 +63,12 @@ spec:
role: Node role: Node
subnets: subnets:
- us-test-1a - us-test-1a
additionaluserdata: additionalUserData:
- name: myscript.sh - name: myscript.sh
type: text/x-shellscript type: text/x-shellscript
content: | content: |
#!/bin/sh #!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt echo "nodes: The time is now $(date -R)!" | tee /root/output.txt
--- ---
@ -88,10 +88,10 @@ spec:
role: Master role: Master
subnets: subnets:
- us-test-1a - us-test-1a
additionaluserdata: additionalUserData:
- name: myscript.sh - name: myscript.sh
type: text/x-shellscript type: text/x-shellscript
content: | content: |
#!/bin/sh #!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt echo "master: The time is now $(date -R)!" | tee /root/output.txt