-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Server model; add redis components for guestbook app (#82)
* add name attribute on Server model; add redis components for guestbook app * update server model: remove boilerplate * update server label key
- Loading branch information
1 parent
2bc8594
commit 11620a1
Showing
43 changed files
with
784 additions
and
278 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,68 @@ | ||
import base.pkg.kusion_models.kube.frontend | ||
import base.pkg.kusion_models.kube.frontend.container | ||
import base.pkg.kusion_models.kube.frontend.service | ||
import base.pkg.kusion_models.kube.templates.resource as res_tpl | ||
|
||
# Application Configuration | ||
guestbookFrontend: frontend.Server { | ||
name = "frontend" | ||
# Main Container Configuration | ||
mainContainer = container.Main { | ||
name = "php-redis" | ||
env = [ | ||
{ | ||
name = "GET_HOSTS_FROM" | ||
value = "dns" | ||
} | ||
] | ||
ports = [{containerPort = 80}] | ||
} | ||
schedulingStrategy.resource = res_tpl.tiny | ||
services = [ | ||
service.Service { | ||
ports = [ | ||
{ | ||
"port" = 80 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
redisLeader: frontend.Server { | ||
name = "redis-leader" | ||
# Main Container Configuration | ||
mainContainer = container.Main { | ||
ports = [{containerPort = 6379}] | ||
} | ||
image = "docker.io/redis:6.0.5" | ||
schedulingStrategy.resource = res_tpl.tiny | ||
services = [ | ||
service.Service { | ||
ports = [ | ||
{ | ||
"port" = 6379 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
redisFollower: frontend.Server { | ||
name = "redis-follower" | ||
# Main Container Configuration | ||
mainContainer = container.Main { | ||
ports = [{containerPort = 6379}] | ||
} | ||
image = "gcr.io/google_samples/gb-redis-follower:v2" | ||
schedulingStrategy.resource = res_tpl.tiny | ||
services = [ | ||
service.Service { | ||
ports = [ | ||
{ | ||
"port" = 6379 | ||
} | ||
] | ||
} | ||
] | ||
} |
File renamed without changes.
Oops, something went wrong.