Skip to content
Closed
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
18 changes: 6 additions & 12 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- master
- release
- ipam
repository_dispatch:
types:
- test-command
Expand Down Expand Up @@ -38,11 +37,11 @@ jobs:
echo "pr-number=${{ github.event.client_payload.github.payload.issue.number }}" >> $GITHUB_OUTPUT
elif [ "${{ steps.get_version.outputs.VERSION }}" != "" ]; then
echo "master=false" >> $GITHUB_OUTPUT
echo "architectures=linux/amd64,linux/arm64,linux/arm/v7" >> $GITHUB_OUTPUT
echo "architectures=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT
echo "commit-ref=${{ steps.get_version.outputs.VERSION }}" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" == "master" ]; then
echo "master=true" >> $GITHUB_OUTPUT
echo "architectures=linux/amd64,linux/arm64,linux/arm/v7" >> $GITHUB_OUTPUT
echo "architectures=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT
echo "commit-ref=${{ github.sha }}" >> $GITHUB_OUTPUT
else
echo "master=false" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -277,7 +276,7 @@ jobs:
id: last-release
with:
repository: ${{ github.repository }}
excludes: prerelease, draft
excludes: draft

- name: Configure Git
run: |
Expand Down Expand Up @@ -312,16 +311,15 @@ jobs:
with:
path: ./liqoctl/

# we need to upload only helm artifacts first, to make the index updater to work
# we need to upload only helm artifacts first, to make the index updater to work
- uses: ncipollo/release-action@v1
with:
artifacts: ".cr-release-packages/*"
generateReleaseNotes: true
token: ${{ secrets.CI_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
tag: ${{ needs.configure.outputs.commit-ref }}
name: ${{ needs.configure.outputs.commit-ref }}
prerelease: ${{ steps.semver_parser.outputs.prerelease != '' }}

- name: Update Helm index
run: |
Expand All @@ -341,11 +339,7 @@ jobs:
- uses: ncipollo/release-action@v1
with:
artifacts: "./liqoctl/**/*"
token: ${{ secrets.CI_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
tag: ${{ needs.configure.outputs.commit-ref }}
name: ${{ needs.configure.outputs.commit-ref }}
prerelease: ${{ steps.semver_parser.outputs.prerelease != '' }}

- name: Update new version in krew-index
uses: rajatjindal/[email protected]
12 changes: 6 additions & 6 deletions .krew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: liqo
spec:
version: {{ .TagName }}
homepage: https://github.com/liqotech/liqo
homepage: https://github.com/castai/liqo
shortDescription: Install and manage Liqo on your clusters
description: |
Liqo is a platform to enable dynamic and decentralized resource sharing across
Expand All @@ -20,29 +20,29 @@ spec:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/liqotech/liqo/releases/download/{{ .TagName }}/liqoctl-darwin-amd64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/castai/liqo/releases/download/{{ .TagName }}/liqoctl-darwin-amd64.tar.gz" .TagName }}
bin: liqoctl
- selector:
matchLabels:
os: darwin
arch: arm64
{{addURIAndSha "https://github.com/liqotech/liqo/releases/download/{{ .TagName }}/liqoctl-darwin-arm64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/castai/liqo/releases/download/{{ .TagName }}/liqoctl-darwin-arm64.tar.gz" .TagName }}
bin: liqoctl
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/liqotech/liqo/releases/download/{{ .TagName }}/liqoctl-linux-amd64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/castai/liqo/releases/download/{{ .TagName }}/liqoctl-linux-amd64.tar.gz" .TagName }}
bin: liqoctl
- selector:
matchLabels:
os: linux
arch: arm64
{{addURIAndSha "https://github.com/liqotech/liqo/releases/download/{{ .TagName }}/liqoctl-linux-arm64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/castai/liqo/releases/download/{{ .TagName }}/liqoctl-linux-arm64.tar.gz" .TagName }}
bin: liqoctl
- selector:
matchLabels:
os: windows
arch: amd64
{{addURIAndSha "https://github.com/liqotech/liqo/releases/download/{{ .TagName }}/liqoctl-windows-amd64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/castai/liqo/releases/download/{{ .TagName }}/liqoctl-windows-amd64.tar.gz" .TagName }}
bin: liqoctl
29 changes: 26 additions & 3 deletions cmd/virtual-kubelet/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,27 +293,50 @@ func runRootCommand(ctx context.Context, c *Opts) error {
func(ctx context.Context, _ error) error {
klog.Info("node setting up")
newNode := nodeProvider.GetNode().DeepCopy()

klog.Infof("Restart check")
if newNode == nil || newNode.Name == "" {
klog.Errorf("Restartining the pod")
if newNode == nil {
klog.Errorf("newNode is nil")
}
if newNode.Name == "" {
klog.Errorf("newNode.Name is empty")
}
klog.Flush() // Force flush before exit
os.Exit(1)
}

newNode.ResourceVersion = ""

if nodeProvider.IsTerminating() {
// this avoids the re-creation of terminated nodes
klog.V(4).Info("skipping: node is in terminating phase")
klog.Info("skipping: node is in terminating phase")
return nil
}

klog.Infof("attempting to get node: %s", newNode.Name)
oldNode, newErr := localClient.CoreV1().Nodes().Get(ctx, newNode.Name, metav1.GetOptions{})
if newErr != nil {
if !k8serrors.IsNotFound(newErr) {
klog.Error(newErr, "node error")
return newErr
}
klog.Info("node not found, creating new node")
_, newErr = localClient.CoreV1().Nodes().Create(ctx, newNode, metav1.CreateOptions{})
klog.Info("new node created")
if newErr == nil {
klog.Info("new node created")
} else {
klog.Errorf("failed to create node: %v", newErr)
}
} else {
klog.Info("node exists, updating status")
oldNode.Status = newNode.Status
_, newErr = localClient.CoreV1().Nodes().UpdateStatus(ctx, oldNode, metav1.UpdateOptions{})
if newErr != nil {
if newErr == nil {
klog.Info("node updated")
} else {
klog.Errorf("failed to update node: %v", newErr)
}
}

Expand Down
Loading