Skip to content

clue2solve/knative-colors

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

knative-colors

Colors is a bare bone app that serves a simple blank html page with background color based on an ENV variable. The the branch names tells you the code for each iteration. The versions ( branches ) build on top of this.

Colors is a bare bone app that serves a simple blank html page with background color based on an ENV variable. The the branch names tells you the code for each iteration. The versions ( branches ) build on top of this.

  • serving-start ==> base starting point for knative-serving needs
  • eventing-start ==> base starting point for knative-eventing needs
  • main ==> latest combined code .

This is the companion app to showcase the basic features of knative. This App in conjunction with the colorgrid makes it simple to understand the flow.

# Create the color grid service 
kn service create  colorgrid --image ghcr.io/clue2solve/colorgrid/colorgrid:latest

# create the rev-1 of the colors app
kn service create bg-demo --image ghcr.io/clue2solve/knative-colors/colors:start  --env HELLO_BG_COLOR="RED"

# create the rev-2 of the app and split the traffic 
kn service update  bg-demo --image ghcr.io/clue2solve/knative-colors/colors:start  --env HELLO_BG_COLOR="blue"
kn service update bg-demo --traffic bg-demo-00002=50,bg-demo-00001=50

# create the rev-3 of the app and re-split the app 
kn service update  bg-demo --image ghcr.io/clue2solve/knative-colors/colors:start  --env HELLO_BG_COLOR="green"
kn service update bg-demo --traffic bg-demo-00002=40,bg-demo-00001=30,bg-demo-00003=30

At each step above, you should be able to hit the URL for the colorgrid with a parameter ?url={URL_OF_BG_DEMO}

Example:

http://colorgrid.default.knative.g.demome.cloud/?url=http://bg-demo.default.knative.g.demome.cloud

Rainbow Deploys demo

Getting to eventually a spec.traffic like:

  traffic:
  - percent: 40
    revisionName: colors-00002
    tag: green
  - percent: 50
    revisionName: colors-00003
    tag: blue
  - percent: 10
    revisionName: colors-00001
    tag: red

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%