Skaffold Default Repo (#1575)

Skaffold default-repo enables users to use the Skaffold file without any change and by maintaining the docker repo in their local configuration.
This commit is contained in:
Vishal
2020-04-19 19:26:38 +05:30
committed by GitHub
parent e732cf59e0
commit 163b1d0731
+8 -10
View File
@@ -1,29 +1,27 @@
#################################### ####################################
# This file can be used with Skaffold (https://github.com/GoogleContainerTools/skaffold) to # This file can be used with Skaffold (https://github.com/GoogleContainerTools/skaffold) to
# build and deploy Fission to Kubernetes cluster. # build and deploy Fission to Kubernetes cluster.
#
############## Usage ############## ############## Usage ##############
# Skaffold CLI should be installed on your machine. # Skaffold CLI should be installed on your machine.
# Change <DOCKERHUB_REPO> -> to your Dockerhub username # Skaffold default-repo should be configured before using locally
# $ skaffold config set default-repo <YOUR_DOCKER_BASE_REPO>
# Run `TAG=1313 skaffold run` to build and deploy with helm - where replace value of tag to what you want to use as tag for image # Run `TAG=1313 skaffold run` to build and deploy with helm - where replace value of tag to what you want to use as tag for image
# Run`skaffold build` to only build and push images # Run`skaffold build` to only build and push images
############## Future Improvement/Limitations ############## ############## Future Improvement/Limitations ##############
# 1) [LOW] Add profiles to suit various deployment needs # 1) [LOW] Add profiles to suit various deployment needs
# 2) [HIGH] Make base repo configurable as Skaffold config (ATM it works for build but not for Helm Deploy)
# (Related issue: https://github.com/GoogleContainerTools/skaffold/issues/3763)
#################################### ####################################
apiVersion: skaffold/v2beta1 apiVersion: skaffold/v2beta1
kind: Config kind: Config
build: build:
artifacts: artifacts:
- image: <DOCKERHUB_REPO>/fission - image: fission
context: . context: .
docker: docker:
dockerfile: cmd/fission-bundle/Dockerfile.fission-bundle dockerfile: cmd/fission-bundle/Dockerfile.fission-bundle
- image: <DOCKERHUB_REPO>/fetcher - image: fetcher
docker: docker:
dockerfile: cmd/fetcher/Dockerfile.fission-fetcher dockerfile: cmd/fetcher/Dockerfile.fission-fetcher
- image: <DOCKERHUB_REPO>/preupgradechecks - image: preupgradechecks
docker: docker:
dockerfile: cmd/preupgradechecks/Dockerfile.fission-preupgradechecks dockerfile: cmd/preupgradechecks/Dockerfile.fission-preupgradechecks
tagPolicy: tagPolicy:
@@ -43,9 +41,9 @@ deploy:
repository: index.docker.io repository: index.docker.io
# The env template values only should go in setValueTemplates, all other overrides in setValues # The env template values only should go in setValueTemplates, all other overrides in setValues
setValueTemplates: setValueTemplates:
image: <DOCKERHUB_REPO>/fission image: fission
preUpgradeChecksImage: <DOCKERHUB_REPO>/preupgradechecks preUpgradeChecksImage: preupgradechecks
fetcher.image: <DOCKERHUB_REPO>/fetcher fetcher.image: fetcher
fetcher.imageTag: "{{.TAG}}" fetcher.imageTag: "{{.TAG}}"
imageTag: "{{.TAG}}" imageTag: "{{.TAG}}"
wait: true wait: true