From 6b168b8b0dea9bf321e2238b11c2ffebd3e4528e Mon Sep 17 00:00:00 2001 From: Sebastian Wendel Date: Tue, 26 Jul 2022 13:02:32 +0200 Subject: [PATCH] added additional make commands for oml operations --- Makefile | 35 ++++++++++++++++++++++++++++++++--- shell.nix | 1 + 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 24fdd8d..b39afda 100644 --- a/Makefile +++ b/Makefile @@ -37,10 +37,13 @@ k3d-delete: ## Delete the local K3D development cluster lint: yaml-lint markdown-lint ## Lint all input files. yaml-lint: ## Lint all YAML files. - yamllint -f auto $(shell pwd) + yamllint -f auto . markdown-lint: ## Lint all Markdown files. - mdl $(shell pwd) + mdl . + +manifest-lint: ## Lint the Kubenetes manifest. + kubectl kustomize overlays/dev --enable-helm | kubeconform -ignore-missing-schemas -strict ##@ Test @@ -55,7 +58,7 @@ manifest: ## Build Kubernetes manifest using Helm. ##@ Deployment deploy: ## Deploy local Kubernetes development cluster. - kubectl kustomize overlays/dev/ --enable-helm | kubectl apply -f - + kubectl kustomize overlays/dev/ --enable-helm | kubectl apply --server-side=true -f - clean: down up deploy ## Deploy a clean local Kubernetes development cluster. @@ -64,5 +67,31 @@ clean: down up deploy ## Deploy a clean local Kubernetes development cluster. get-all: ## Get the state of all Kubernetes resources. kubectl get all --all-namespaces +get-ns: ## Get all Kubernetes namespaces. + kubectl get namespaces + +get-api: ## Get all Kubernetes api resources. + kubectl api-resources + watch-all: ## Watch the state of all Kubernetes resources. watch -n 1 kubectl get all --all-namespaces + +get-olm-status: ## Get the state of the Operator Framework Lifecycle Manager. + operator-sdk olm status + +get-olm-cat: ## Get the catalog sources of the Operator Framework Lifecycle Manager. + kubectl get catalogsources.operators.coreos.com --all-namespaces + +get-olm-subs: ## Get the catalog subscriptions of the Operator Framework Lifecycle Manager. + kubectl get subscriptions.operators.coreos.com --all-namespaces + +get-olm-pkgs: ## Get the package manifest of the Operator Framework Lifecycle Manager. + kubectl get packagemanifest --all-namespaces + +get-olm-ip: ## Get the install plans of the Operator Framework Lifecycle Manager. + kubectl get installplans.operators.coreos.com --all-namespaces + +##@ Logs + +logs-oml-op: ## Show logs of the Operator Framework Lifecycle Manager. + kubectl logs -f deployment.apps/olm-operator --all-containers -n olm diff --git a/shell.nix b/shell.nix index d8370e5..4018dae 100644 --- a/shell.nix +++ b/shell.nix @@ -13,6 +13,7 @@ mkShell { k9s kube-score kube3d + kubeconform kubectl kubectx kubernetes-helm