Skip to content

Commit

Permalink
Add support for deploying to K8s and TP4K8s (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
pacphi authored Nov 7, 2024
1 parent 05f55b1 commit 5203377
Show file tree
Hide file tree
Showing 13 changed files with 446 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ tsconfig.json
types.d.ts
node_modules
vite.*

# Tanzu Platform
.tanzu/
tanzu.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Companion UI for [Sanford](https://github.com/cf-toolsuite/sanford)

[![GA](https://img.shields.io/badge/Release-Alpha-darkred)](https://img.shields.io/badge/Release-Alpha-darkred) ![Github Action CI Workflow Status](https://github.com/cf-toolsuite/sanford-ui/actions/workflows/ci.yml/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/cf-toolsuite/sanford-ui/badge.svg?style=plastic)](https://snyk.io/test/github/cf-toolsuite/sanford-ui) [![Release](https://jitpack.io/v/cf-toolsuite/sanford-ui.svg)](https://jitpack.io/#cf-toolsuite/sanford-ui/master-SNAPSHOT) [![License](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://opensource.org/license/agpl-v3)
[![GA](https://img.shields.io/badge/Release-Alpha-darkred)](https://img.shields.io/badge/Release-Alpha-darkred) ![Github Action CI Workflow Status](https://github.com/cf-toolsuite/sanford-ui/actions/workflows/ci.yml/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/cf-toolsuite/sanford-ui/badge.svg?style=plastic)](https://snyk.io/test/github/cf-toolsuite/sanford-ui) [![Release](https://jitpack.io/v/cf-toolsuite/sanford-ui.svg)](https://jitpack.io/#cf-toolsuite/sanford-ui/master-SNAPSHOT) [![GitHub CR](https://img.shields.io/badge/GitHub%20CR-cf%2ctoolsuite/sanford%2cui-darkblue)](https://github.com/cf-toolsuite/sanford-ui/pkgs/container/sanford-ui) [![License](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://opensource.org/license/agpl-v3)

* [Prerequisites](docs/PREREQUISITES.md)
* [Tools](docs/TOOLS.md)
Expand Down
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id 'com.gorylenko.gradle-git-properties' version '2.4.2'
id 'org.springframework.boot' version '3.3.5'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.eclipse.jkube.kubernetes' version '1.17.0'
}

group = 'org.cftoolsuite'
Expand Down Expand Up @@ -56,6 +57,27 @@ bootRun {
systemProperties System.properties
}

tasks.named('bootBuildImage') {
imageName = "docker.io/${project.group.contains('.') ? project.group.tokenize('.').last() : project.group}/${project.name}:${project.version}"
tags = [ "docker.io/${project.group.contains('.') ? project.group.tokenize('.').last() : project.group}/${project.name}:latest" ]
}

kubernetes {
buildStrategy = 'buildpacks'
generator {
config {
'spring-boot' {
color = 'always'
}
}
}
helm {
maintainers = [{
name = 'Chris Phillipson'
}]
}
}

task setVersion {
doLast {
def newVersion = project.hasProperty('newVersion') ? project.newVersion : version
Expand Down
6 changes: 6 additions & 0 deletions docs/CLONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
```bash
git clone https://github.com/cf-toolsuite/sanford-ui.git
```

or

```bash
gh repo clone cf-toolsuite/sanford-ui
```
9 changes: 8 additions & 1 deletion docs/PREREQUISITES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@

## Prerequisites

### Cloud Foundry
### Tanzu Platform for Cloud Foundry

* cf CLI
* An account with space developer role and access to an organization and space on a target foundation
* [Postgres](https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Tanzu%20for%20Postgres%20on%20Cloud%20Foundry) tile 1.2.0 or better
* [GenAI](https://support.broadcom.com/group/ecx/productdownloads?subfamily=GenAI%20on%20Tanzu%20Platform%20for%20Cloud%20Foundry) tile 1.0.1 or better

### Kubernetes

* kubectl CLI
* kind CLI

### Tanzu Platform for Kubernetes

* tanzu CLI
* An account with RBAC permissions to a project and space
Loading

0 comments on commit 5203377

Please sign in to comment.