Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a MVP for kyma app push command #2236

Open
4 tasks
kwiatekus opened this issue Nov 5, 2024 · 1 comment
Open
4 tasks

Implement a MVP for kyma app push command #2236

kwiatekus opened this issue Nov 5, 2024 · 1 comment
Assignees
Labels

Comments

@kwiatekus
Copy link
Contributor

kwiatekus commented Nov 5, 2024

Description

Implement a new kyma app push command that deploys k8s resources that are necessary to transform docker image definition (dockerfile) into an application.

For example (just a proposal at this stage)

//will use Dockerfile from the current folder
kyma app push --name foo 

//will use Dockerfile from the bar folder and use custom port 8080
kyma app push --name foo --dockerfile bar/Dockerfile --expose 8080

//will not build the image but simply use nginx as app's image
kyma app push --name mynginx  --image nginx:latest

AC
The command should:

  • should be available in command palette as soon as the connection to cluster is established (kubeconfig context is set)
  • locate the dockerfile (lookup in the current folder by default),
  • fail if no dockerfile was found and no --image flag was used,
  • build the image if needed
  • push the image to the registry (the command should read the in-cluster's docker registry config.json) if needed
  • fail if --dockerfile option is used but no docker registry module is available in the cluster
  • apply deployment (making use of exposed port information read from dockerfile)
  • apply k8s service (making use of the port information read from dockerfile)
  • (if api-gateway module is enabled) apply api-rule to expose all paths for the default, or user provided port and using the app name as a hostname

The definition of the command should be part of docker-registry module.
Presence of api-gateway module should extend the command's default capability by adding the api-rule on top.

Execution

Reasons
Kyma users need a simple way to deploy containerised application without having any kubernetes knowledge.

@kwiatekus
Copy link
Contributor Author

Stages:

  • create deployment based on --name and --image and --containerPort (3)
kyma alpha app push --name mynginx --image nginx:latest --containerPort xx
  • parse dockerfile to read port information and define k8s svc (2)

  • detection and support for api-gateway (3)

kyma alpha app push --name mynginx --image nginx:latest --containerPort xx --expose true
  • support custom image building (using lib, not docker daemon from host machine) (3)
kyma alpha app push --name myservice  --containerPort xx --expose true --dockerfile .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants