Skip to content

Commit 9056aa5

Browse files
committed
Fixed Structure
1 parent 02a258a commit 9056aa5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kubernetes/structures_daemonset.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ func flattenDaemonSetStrategy(in appsv1.DaemonSetUpdateStrategy) []interface{} {
4949

5050
func flattenDaemonSetStrategyRollingUpdate(in *appsv1.RollingUpdateDaemonSet) []interface{} {
5151
att := make(map[string]interface{})
52+
if in.MaxUnavailable != nil {
53+
att["max_surge"] = in.MaxSurge.String()
54+
}
5255
if in.MaxUnavailable != nil {
5356
att["max_unavailable"] = in.MaxUnavailable.String()
5457
}
@@ -111,7 +114,7 @@ func expandRollingUpdateDaemonSet(p []interface{}) *appsv1.RollingUpdateDaemonSe
111114

112115
if v, ok := in["max_surge"].(string); ok {
113116
val := intstr.Parse(v)
114-
obj.MaxUnavailable = &val
117+
obj.MaxSurge = &val
115118
}
116119

117120
if v, ok := in["max_unavailable"].(string); ok {

0 commit comments

Comments
 (0)