Skip to content

Commit

Permalink
Merge pull request #17 from nyu-devops/skaffold
Browse files Browse the repository at this point in the history
Added skaffold support back
  • Loading branch information
rofrano authored Oct 27, 2023
2 parents 09f2dec + f0f644e commit b669d7a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ run: ## Run the service
.PHONY: cluster
cluster: ## Create a K3D Kubernetes cluster with load balancer and registry
$(info Creating Kubernetes cluster with a registry and 1 worker node...)
k3d registry create registry.local --port 32000
k3d cluster create devops --agents 1 --registry-use k3d-registry.local:32000 --port '8080:80@loadbalancer'
k3d registry create registry.local --port 5000
k3d cluster create devops --agents 1 --registry-use k3d-registry.local:5000 --port '8080:80@loadbalancer'

.PHONY: cluster-rm
cluster-rm: ## Remove a K3D Kubernetes cluster
Expand Down
3 changes: 2 additions & 1 deletion k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ spec:
restartPolicy: Always
containers:
- name: hitcounter
image: k3d-registry.local:32000/hitcounter:1.0
# image: k3d-registry.local:5000/hitcounter:1.0
image: hitcounter
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
Expand Down
1 change: 1 addition & 0 deletions skaffold.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SKAFFOLD_DEFAULT_REPO=k3d-registry.local:5000
5 changes: 4 additions & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ metadata:
name: hitcounter
build:
artifacts:
- image: registry.local:32000/hitcounter
- image: hitcounter
docker:
dockerfile: Dockerfile
# sync:
# infer:
# - 'service/**/*.py'
test:
- context: .
image: hitcounter
Expand Down

0 comments on commit b669d7a

Please sign in to comment.