Skip to content

Commit

Permalink
Merge pull request metal3-io#80 from dtantsur/image-override
Browse files Browse the repository at this point in the history
🐛 Fix image override in the Makefile, collect more logs
  • Loading branch information
metal3-io-bot authored Nov 25, 2024
2 parents c3546a2 + aa42070 commit 3017a60
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified

.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/manager && $(KUSTOMIZE) edit set image quay.io/metal3-io/ironic-standalone-operator=${IMG}
$(KUSTOMIZE) build config/$(DEPLOY_TARGET) | kubectl apply -f -

.PHONY: undeploy
Expand Down
9 changes: 7 additions & 2 deletions test/collect-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -ux

LOGDIR="${LOGDIR:-/tmp/logs}"

mkdir -p "${LOGDIR}"
mkdir -p "${LOGDIR}/controller/"

kubectl get -o yaml \
-n ironic-standalone-operator-system deployment/ironic-standalone-operator-controller-manager \
> "${LOGDIR}/controller/deployment.yaml"
kubectl get pod -o yaml \
-n ironic-standalone-operator-system > "${LOGDIR}/controller/pods.yaml"
kubectl logs \
-n ironic-standalone-operator-system deployment/ironic-standalone-operator-controller-manager \
> "${LOGDIR}/controller.log"
> "${LOGDIR}/controller/manager.log"
4 changes: 4 additions & 0 deletions test/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func WaitForIronic(name types.NamespacedName) *metal3api.Ironic {
err := k8sClient.Get(ctx, name, ironic)
Expect(err).NotTo(HaveOccurred())

writeYAML(ironic, ironic.Namespace, ironic.Name, "ironic")

cond := meta.FindStatusCondition(ironic.Status.Conditions, string(metal3api.IronicStatusReady))
if cond != nil && cond.Status == metav1.ConditionTrue {
Expect(ironic.Status.InstalledVersion).ToNot(BeNil())
Expand All @@ -125,13 +127,15 @@ func WaitForIronic(name types.NamespacedName) *metal3api.Ironic {
deploy, err := clientset.AppsV1().DaemonSets(name.Namespace).Get(ctx, deployName, metav1.GetOptions{})
if err == nil {
GinkgoWriter.Printf(".. status of daemon set: %+v\n", deploy.Status)
writeYAML(deploy, deploy.Namespace, deploy.Name, "daemonset")
} else if !k8serrors.IsNotFound(err) {
Expect(err).NotTo(HaveOccurred())
}
} else {
deploy, err := clientset.AppsV1().Deployments(name.Namespace).Get(ctx, deployName, metav1.GetOptions{})
if err == nil {
GinkgoWriter.Printf(".. status of deployment: %+v\n", deploy.Status)
writeYAML(deploy, deploy.Namespace, deploy.Name, "deployment")
} else if !k8serrors.IsNotFound(err) {
Expect(err).NotTo(HaveOccurred())
}
Expand Down

0 comments on commit 3017a60

Please sign in to comment.