diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 655a6d3..3d5929b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,6 +2,8 @@ name: ci on: push: + branches: + - main jobs: build: @@ -10,9 +12,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -23,9 +27,6 @@ jobs: uses: actions/setup-go@v4 with: go-version: '^1.13.1' - - - name: Build - run: make build - name: Login to ghcr.io @@ -34,6 +35,7 @@ jobs: registry: ghcr.io username: ${{github.actor}} password: ${{secrets.GITHUB_TOKEN}} + - - name: Push container - run: docker push ghcr.io/siderolabs/kube-scheduler:latest + name: Build + run: make PUSH=true build diff --git a/Makefile b/Makefile index 75c78b1..3e8a925 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ +PUSH ?= false + all: gen build build: - docker build -t ghcr.io/siderolabs/kube-scheduler . + docker buildx build --push=$(PUSH) --platform=linux/amd64,linux/arm64 -t ghcr.io/siderolabs/kube-scheduler . gen: deepcopy-gen --input-dirs ./apis/config --go-header-file ./hack/boilerplate.txt -O zz_generated.deepcopy diff --git a/hack/daemonset.yaml b/hack/daemonset.yaml index 2b21488..601be58 100644 --- a/hack/daemonset.yaml +++ b/hack/daemonset.yaml @@ -103,7 +103,7 @@ metadata: name: kube-scheduler-siderolabs namespace: kube-system labels: - k8s-app: fluentd-logging + k8s-app: kube-scheduler-siderolabs spec: selector: matchLabels: @@ -133,8 +133,6 @@ spec: mountPath: /etc/kubernetes/kubeconfig - name: config-volume mountPath: /etc/kubernetes - - name: tls-volume - mountPath: /etc/ssl volumes: - name: credentials-volume projected: @@ -147,7 +145,3 @@ spec: items: - key: config path: kube-scheduler-configuration.yaml - - name: tls-volume - hostPath: - path: /etc/ssl - type: Directory diff --git a/pkg/controllers/node/node.go b/pkg/controllers/node/node.go index ef5d889..ed460c4 100644 --- a/pkg/controllers/node/node.go +++ b/pkg/controllers/node/node.go @@ -23,10 +23,6 @@ const bmcPasswordAnnotation = "bmc.siderolabs.com/password" type BMCs map[string]*bmc.BMCInfo -var ( - bmcs = make(BMCs) -) - // NodeManager manages the power state of nodes. type NodeManager struct { informerFactory informers.SharedInformerFactory @@ -136,8 +132,6 @@ func (c *NodeManager) nodeUpdate(old, new interface{}) { func (c *NodeManager) nodeDelete(obj interface{}) { node := obj.(*v1.Node) - delete(bmcs, node.Name) - klog.Infof("node deleted: %q", node.Name) }