-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from adrianchiris/add-skaffold-support
Add local dev env via skaffold
- Loading branch information
Showing
5 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: nic-feature-discovery | ||
|
||
patches: | ||
- target: | ||
version: v1 | ||
group: apps | ||
kind: DaemonSet | ||
name: nic-feature-discovery-ds | ||
patch: |- | ||
- op: replace | ||
path: /spec/template/spec/containers/0/args | ||
value: ["--v=5", "--logging-format=text"] | ||
resources: | ||
- ../default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: skaffold/v4beta6 | ||
kind: Config | ||
metadata: | ||
name: nic-feature-discovery | ||
build: | ||
artifacts: | ||
- image: ghcr.io/mellanox/nic-feature-discovery | ||
docker: | ||
dockerfile: Dockerfile | ||
manifests: | ||
kustomize: | ||
paths: | ||
- deployment/k8s/base | ||
profiles: | ||
- name: local-dev | ||
manifests: | ||
kustomize: | ||
paths: | ||
- deployment/k8s/overlays/dev | ||
activation: | ||
- command: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: '3' | ||
|
||
tasks: | ||
start: | ||
desc: deploy using skaffold to k8s using current kube context (run with -o interleaved for interactive output) | ||
vars: | ||
NFD_VERSION: v0.13.3 | ||
cmd: | | ||
minikube --profile nfd-dev start | ||
# this one will point docker cli to the same daemon as used by minikube nfd-dev cluster | ||
# that way skaffold will build images in the correct local repo. | ||
eval $(minikube -p nfd-dev docker-env) | ||
kubectl apply -k "https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref={{.NFD_VERSION}}" | ||
skaffold dev --trigger=manual | ||
clean: | ||
desc: clean local k8s dev cluster | ||
cmd: minikube --profile nfd-dev delete | ||
|
||
deploy: | ||
desc: deploy on pre-created cluster | ||
vars: | ||
LOCALDEV_IMAGE_REPO: '{{.LOCALDEV_IMAGE_REPO | default "harbor.mellanox.com/cloud-orchestration-dev"}}' | ||
#LOCALDEV_KUBECONFIG: "/path/to/kubeconfig" <- optional, pass in via env var | ||
#LOCALDEV_KUBECONTEXT: "kube-context-name" <- optional, pass in via env var | ||
cmd: | | ||
export SK_FLAGS="{{if .LOCALDEV_KUBECONFIG}}--kubeconfig={{.LOCALDEV_KUBECONFIG}}{{else}}{{if .LOCALDEV_KUBECONTEXT}}--kube-context={{.LOCALDEV_KUBECONTEXT}}{{end}}{{end}}" | ||
skaffold dev --trigger=manual --default-repo={{.LOCALDEV_IMAGE_REPO}} $SK_FLAGS |