Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
feat: Migrate deployment to UDS (#58)
Browse files Browse the repository at this point in the history
* Add default lfai image tag to the chart values file
* Remove VS and metallb configs
* Add uds-package CRD config
* Update deployment test pipeline to use UDS

---------

Co-authored-by: Gregory <[email protected]>
  • Loading branch information
YrrepNoj and gphorvath authored Feb 23, 2024
1 parent 3fc81cc commit c44f80d
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 121 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@ jobs:
- name: Build leapfrogai zarf package
run: make zarf-build VERSION=local

- name: Install UDS-CLI
run: |
wget https://github.com/defenseunicorns/uds-cli/releases/download/v0.9.2/uds-cli_v0.9.2_Linux_amd64
chmod +x uds-cli_v0.9.2_Linux_amd64
sudo mv uds-cli_v0.9.2_Linux_amd64 /usr/local/bin/uds
- name: Setup K3D
uses: defenseunicorns/zarf/.github/actions/k3d@9a97f837a1b9ea2fee4bf202d356bb7de1aa4acb #v0.32.1
run: |
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.6.0 bash
- name: Initialize zarf
run: zarf init --confirm
- name: Setup UDS
run: |
uds deploy k3d-core-istio-dev:0.12.0 --confirm
- name: Deploy LFAI Package
run: zarf package deploy zarf-package-leapfrogai-api-amd64*.tar.zst --confirm
Expand Down
2 changes: 0 additions & 2 deletions chart/templates/namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
istio-injection: {{ .Values.istio.injection }}
name: leapfrogai
26 changes: 26 additions & 0 deletions chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: uds.dev/v1alpha1
kind: Package
metadata:
name: leapfrogai-api
namespace: {{ .Release.Namespace }}
spec:
network:
expose:
- service: api
podLabels:
app: api
host: {{ .Values.package.host }}
gateway: tenant
port: 8080

allow:
- direction: Ingress
remoteGenerated: Anywhere

- direction: Egress
remoteGenerated: Anywhere

- direction: Egress
podLabels:
app: api
remoteGenerated: Anywhere
18 changes: 0 additions & 18 deletions chart/templates/vs.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
domain: bigbang.dev

image:
lfaiAPITag: ###ZARF_CONST_LEAPFROGAI_API_VERSION###
lfaiAPITag: v0.4.6
kiwigridTag: 1.23.3

istio:
enabled: false
gateway: tenant
injection: disabled

api:
replicas: 1
port: 8080

monitoring:
enabled: false
enabled: false

package:
host: leapfrogai-api
9 changes: 1 addition & 8 deletions lfai-values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
domain: ###ZARF_VAR_DOMAIN###

image:
lfaiAPITag: ###ZARF_CONST_LEAPFROGAI_API_VERSION###
kiwigridTag: ###ZARF_CONST_KIWIGRID_VERSION###

istio:
enabled: ###ZARF_VAR_ISTIO_ENABLED###
gateway: ###ZARF_VAR_ISTIO_GATEWAY###
injection: ###ZARF_VAR_ISTIO_INJECTION###
kiwigridTag: ###ZARF_CONST_KIWIGRID_VERSION###
27 changes: 0 additions & 27 deletions metallb/gateway.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions metallb/service.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion zarf-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
create:
set:
leapfrogai_api_version: 0.4.4
leapfrogai_api_version: dev
kiwigrid_version: 1.23.3
max_package_size: "1000000000"
22 changes: 2 additions & 20 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,16 @@ constants:
- name: KIWIGRID_VERSION
value: "###ZARF_PKG_TMPL_KIWIGRID_VERSION###"

variables:
- name: ISTIO_ENABLED
default: "false"
- name: ISTIO_GATEWAY
default: "tenant"
- name: ISTIO_INJECTION
default: "disabled"
- name: DOMAIN
default: "bigbang.dev"

components:
- name: leapfrogai
required: true
charts:
- name: leapfrogai
- name: leapfrogai
namespace: leapfrogai
localPath: chart
version: "###ZARF_PKG_TMPL_LEAPFROGAI_API_VERSION###"
valuesFiles:
- "lfai-values.yaml"
images:
- "ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api:###ZARF_PKG_TMPL_LEAPFROGAI_API_VERSION###"
- "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:###ZARF_PKG_TMPL_KIWIGRID_VERSION###"
- name: metallb-config
required: false
description: "Creates metallb tenant ingresses for the cluster"
manifests:
- name: metallb-config
files:
- metallb/gateway.yaml
- metallb/service.yaml
- "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:###ZARF_PKG_TMPL_KIWIGRID_VERSION###"

0 comments on commit c44f80d

Please sign in to comment.