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

Run frontend from go binary #720

Merged

Conversation

szwedm
Copy link
Contributor

@szwedm szwedm commented Jun 12, 2024

Description

Changes proposed in this pull request:

Bundle frontend static files to go binary.

Related issue(s)

See #442

@kyma-bot kyma-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 12, 2024
@kyma-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 12, 2024
@szwedm
Copy link
Contributor Author

szwedm commented Jun 13, 2024

/test pull-btp-manager-build

@szwedm
Copy link
Contributor Author

szwedm commented Jun 13, 2024

/test pull-btp-manager-build

1 similar comment
@szwedm
Copy link
Contributor Author

szwedm commented Jun 13, 2024

/test pull-btp-manager-build

@szwedm szwedm marked this pull request as ready for review June 13, 2024 08:43
@szwedm szwedm requested a review from a team as a code owner June 13, 2024 08:43
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 13, 2024
@szwedm szwedm self-assigned this Jun 13, 2024
@szwedm
Copy link
Contributor Author

szwedm commented Jun 13, 2024

/hold

@kyma-bot kyma-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 13, 2024
Makefile Show resolved Hide resolved
main.go Show resolved Hide resolved
@szwedm szwedm requested a review from a team as a code owner June 14, 2024 10:36
@kyma-bot kyma-bot added the area/documentation Issues or PRs related to documentation label Jun 14, 2024
> Use the latest development image to test the UI: europe-docker.pkg.dev/kyma-project/dev/btp-manager:PR-720

Follow steps below to run BTP Manager with UI:
1. Connect `kubectl` to your cluster by setting `KUBECONFIG` environment variable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Connect `kubectl` to your cluster by setting `KUBECONFIG` environment variable.
1. Connect `kubectl` to your cluster by setting the **KUBECONFIG** environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

```shell
export KUBECONFIG=<path-to-kubeconfig>
```
2. Make sure `btp-operator` module is disabled and there are no existing BtpOperator custom resources and deployments of BTP Manager and SAP BTP service operator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Make sure `btp-operator` module is disabled and there are no existing BtpOperator custom resources and deployments of BTP Manager and SAP BTP service operator.
2. Make sure the `btp-operator` module is disabled and there are no existing BtpOperator custom resources (CRs) and deployments of BTP Manager and the SAP BTP service operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

kubectl get deployment -n kyma-system btp-manager-controller-manager
kubectl get deployment -n kyma-system sap-btp-operator-controller-manager
```
3. Clone `btp-manager` repository and checkout to `sm-integration` branch.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Clone `btp-manager` repository and checkout to `sm-integration` branch.
3. Clone the `btp-manager` repository and checkout to the `sm-integration` branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

git clone https://github.com/kyma-project/btp-manager.git
git checkout sm-integration
```
4. Set `IMG` environment variable to the image of BTP Manager with UI.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Set `IMG` environment variable to the image of BTP Manager with UI.
4. Set the **IMG** environment variable to the image of BTP Manager with UI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

```shell
kubectl get deployment -n kyma-system btp-manager-controller-manager
```
In case you encounter the following error during Pod creation due to Warden's admission webhook:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In case you encounter the following error during Pod creation due to Warden's admission webhook:
If you encounter the following error during Pod creation due to Warden's admission webhook:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

```
Error creating: admission webhook "validation.webhook.warden.kyma-project.io" denied the request: Pod images europe-docker.pkg.dev/kyma-project/dev/btp-manager:PR-720 validation failed
```
you need to scale BTP Manager deployment to 0 replicas, delete the webhook and the scale deployment back to 1 replica.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
you need to scale BTP Manager deployment to 0 replicas, delete the webhook and the scale deployment back to 1 replica.
you must scale the BTP Manager deployment to 0 replicas, delete the webhook, and scale the deployment back to 1 replica.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io validation.webhook.warden.kyma-project.io
kubectl scale deployment -n kyma-system btp-manager-controller-manager --replicas=1
```
7. Apply BtpOperator custom resource to create the secret with credentials to access Service Manager.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
7. Apply BtpOperator custom resource to create the secret with credentials to access Service Manager.
7. Apply BtpOperator CR to create the Secret with credentials to access Service Manager.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

Comment on lines 9 to 11
```shell
export KUBECONFIG=<path-to-kubeconfig>
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent the code blocks and other content under each of the steps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion applied.

PK85
PK85 previously approved these changes Jun 14, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Jun 14, 2024
@kyma-bot kyma-bot removed the lgtm Looks good to me! label Jun 14, 2024
docs/contributor/ui.md Outdated Show resolved Hide resolved
docs/contributor/ui.md Outdated Show resolved Hide resolved
docs/contributor/ui.md Outdated Show resolved Hide resolved
docs/contributor/ui.md Outdated Show resolved Hide resolved
docs/contributor/ui.md Outdated Show resolved Hide resolved
docs/contributor/ui.md Outdated Show resolved Hide resolved
@kyma-bot kyma-bot added the lgtm Looks good to me! label Jun 17, 2024
@szwedm
Copy link
Contributor Author

szwedm commented Jun 17, 2024

/unhold

@kyma-bot kyma-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 17, 2024
@szwedm szwedm merged commit 5adbe6e into kyma-project:sm-integration Jun 17, 2024
13 of 14 checks passed
szwedm added a commit that referenced this pull request Aug 21, 2024
* Serve frontend from go

* Build UI static files

* Change metrics server port

* Add API config fields in deployment

* Fix serving API on 8080 port

* Add makefile rule to build ui

* Change the order of makefile rules

* eslint

* eslint

* Fix dockerfile copy

* Add doc describing how to deploy BTP Manager with UI

* Fix docs

* Add cleanup info, prerequisites info and fix formatting

* Typos

* Apply suggestions from doc review

Co-authored-by: Iwona Langer <[email protected]>

* Rename ui.md to 09-10-ui.md

---------

Co-authored-by: Iwona Langer <[email protected]>
kyma-gopher-bot pushed a commit that referenced this pull request Aug 22, 2024
* Serve frontend from go

* Build UI static files

* Change metrics server port

* Add API config fields in deployment

* Fix serving API on 8080 port

* Add makefile rule to build ui

* Change the order of makefile rules

* eslint

* eslint

* Fix dockerfile copy

* Add doc describing how to deploy BTP Manager with UI

* Fix docs

* Add cleanup info, prerequisites info and fix formatting

* Typos

* Apply suggestions from doc review

Co-authored-by: Iwona Langer <[email protected]>

* Rename ui.md to 09-10-ui.md

---------

Co-authored-by: Iwona Langer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants