Skip to content
Draft

unplug #1546

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions images/virt-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Source https://github.com/kubevirt/kubevirt/blob/v1.3.1/hack/dockerized#L15
{{- $gitRepoName := "3p-kubevirt" }}
{{- $tag := get $.Core $gitRepoName }}
{{- $tag := print "v1.3.1-virtualization-hot-unplug-cloud-init" }}
{{- $version := (split "-" $tag)._0 }}

---
Expand All @@ -13,7 +13,7 @@ secrets:
value: {{ $.SOURCE_REPO }}
shell:
install:
- git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/deckhouse/3p-kubevirt --branch {{ $tag }} /kubevirt
- git clone --depth=1 https://github.com/deckhouse/3p-kubevirt --branch v1.3.1-virtualization-hot-unplug-cloud-init /kubevirt

---

Expand Down Expand Up @@ -66,9 +66,15 @@ shell:
{{ $builderDependencies.altPackages | join " " }}

{{- include "alt packages clean" . | nindent 2 }}

installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" # <--- для пересборки
install:
- |
echo "$date"
echo kek

rm -rf /kubevirt
git clone --depth=1 https://github.com/deckhouse/3p-kubevirt --branch v1.3.1-virtualization-hot-unplug-cloud-init /kubevirt

# Install packages
PKGS="{{ $builderDependencies.packages | join " " }}"
for pkg in $PKGS; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,19 @@ func compareMemory(current, desired *v1alpha2.VirtualMachineSpec) []FieldChange
}

func compareProvisioning(current, desired *v1alpha2.VirtualMachineSpec) []FieldChange {
// Special case: if we're removing provisioning (desired is nil), don't require restart
if current.Provisioning != nil && desired.Provisioning == nil {
return []FieldChange{
{
Operation: ChangeRemove,
Path: "provisioning",
CurrentValue: current.Provisioning,
DesiredValue: nil,
ActionRequired: ActionApplyImmediate,
},
}
}

changes := compareEmpty(
"provisioning",
NewPtrValue(current.Provisioning, current.Provisioning == nil),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ provisioning:
),
},
{
"restart on provisioning remove",
"apply immediate on provisioning remove",
`
provisioning:
type: UserDataRef
Expand All @@ -277,7 +277,7 @@ provisioning:
`,
"",
assertChanges(
actionRequired(ActionRestart),
actionRequired(ActionApplyImmediate),
requirePathOperation("provisioning", ChangeRemove),
),
},
Expand Down
Loading