Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linting_bash_python_yaml_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
fi

- name: Display changed files
if: always() # Always run this step
if: always() # Always run this step
run: cat changed_files_in_PR.txt || echo "No bash files have changed in this PR."

- name: Run ShellCheck on changed files
Expand Down
90 changes: 45 additions & 45 deletions .github/workflows/oci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
# Publish `master` as `latest` OCI image.
branches:
- master
- v*
- master
- v*

# Publish `v1.2.3` tags as releases.
tags:
- v*
- v*

# Run tests for any PRs.
pull_request:
Expand All @@ -22,11 +22,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Run tests
run: |
make docker-build
- name: Run tests
run: |
make docker-build

push:
needs: test
Expand All @@ -38,46 +38,46 @@ jobs:
contents: read

steps:
- name: Check out code
uses: actions/checkout@v4
- name: Check out code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,ppc64le,arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,ppc64le,arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for OCI image
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
# Add 'latest' tag for master branch pushes
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
- name: Extract metadata (tags, labels) for OCI image
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
# Add 'latest' tag for master branch pushes
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}

- name: Build and push multi-architecture OCI image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push multi-architecture OCI image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: '0 0 * * *' # Run every day at midnight
- cron: '0 0 * * *' # Run every day at midnight
workflow_dispatch:

jobs:
Expand Down
186 changes: 93 additions & 93 deletions .github/workflows/test-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,103 +2,103 @@ name: Frontend Test
on:
pull_request:
paths:
- frontend/**
- frontend/**
jobs:
frontend-format-linting-check:
name: Code format and lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Format code
run: |
npm install [email protected] --prefix ./frontend
make prettier-check
- name: Lint code
run: |
cd frontend
npm ci --no-audit
npm run lint-check
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Format code
run: |
npm install [email protected] --prefix ./frontend
make prettier-check
- name: Lint code
run: |
cd frontend
npm ci --no-audit
npm run lint-check
frontend-unit-tests:
name: Frontend Unit Tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Fetch Kubeflow and Build Common Library
run: |
COMMIT=$(cat frontend/COMMIT)
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
cd kubeflow
git checkout $COMMIT
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci --no-audit
npm run build
npm link ./dist/kubeflow
- name: Install Frontend Dependencies and Setup Styles
run: |
cd frontend
npm ci --no-audit
npm link kubeflow
# Copy styles from kubeflow source to local styles directory
mkdir -p ./src/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./src/styles/
# Also copy to node_modules for the copyCSS script
mkdir -p ./node_modules/kubeflow/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./node_modules/kubeflow/styles/
- name: Run Unit Tests
run: |
cd frontend
npm run test:jest
name: Frontend Unit Tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Fetch Kubeflow and Build Common Library
run: |
COMMIT=$(cat frontend/COMMIT)
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
cd kubeflow
git checkout $COMMIT
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci --no-audit
npm run build
npm link ./dist/kubeflow
- name: Install Frontend Dependencies and Setup Styles
run: |
cd frontend
npm ci --no-audit
npm link kubeflow
# Copy styles from kubeflow source to local styles directory
mkdir -p ./src/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./src/styles/
# Also copy to node_modules for the copyCSS script
mkdir -p ./node_modules/kubeflow/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./node_modules/kubeflow/styles/
- name: Run Unit Tests
run: |
cd frontend
npm run test:jest
frontend-mock-tests:
name: Frontend Mock Tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Fetch Kubeflow and Build Common Library
run: |
COMMIT=$(cat frontend/COMMIT)
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
cd kubeflow
git checkout $COMMIT
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci --no-audit
npm run build
npm link ./dist/kubeflow
- name: Install Frontend Dependencies and Setup Styles
run: |
cd frontend
npm ci --no-audit
npm link kubeflow
# Copy styles from kubeflow source to local styles directory
mkdir -p ./src/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./src/styles/
# Also copy to node_modules for the copyCSS script
mkdir -p ./node_modules/kubeflow/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./node_modules/kubeflow/styles/
# Copy assets as well
mkdir -p ./node_modules/kubeflow/assets/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/assets/* ./node_modules/kubeflow/assets/
- name: Run E2E Tests
run: |
cd frontend
npm run e2e:cypress:ci
name: Frontend Mock Tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Fetch Kubeflow and Build Common Library
run: |
COMMIT=$(cat frontend/COMMIT)
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
cd kubeflow
git checkout $COMMIT
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci --no-audit
npm run build
npm link ./dist/kubeflow
- name: Install Frontend Dependencies and Setup Styles
run: |
cd frontend
npm ci --no-audit
npm link kubeflow
# Copy styles from kubeflow source to local styles directory
mkdir -p ./src/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./src/styles/
# Also copy to node_modules for the copyCSS script
mkdir -p ./node_modules/kubeflow/styles/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/styles/* ./node_modules/kubeflow/styles/
# Copy assets as well
mkdir -p ./node_modules/kubeflow/assets/
cp -r /tmp/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/src/assets/* ./node_modules/kubeflow/assets/
- name: Run E2E Tests
run: |
cd frontend
npm run e2e:cypress:ci
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,30 @@ The following is a list of environment variables that can be set for any web app
| GRAFANA_PREFIX | /grafana | Controls the Grafana endpoint prefix for metrics dashboards |
| GRAFANA_CPU_MEMORY_DB | db/knative-serving-revision-cpu-and-memory-usage | Grafana dashboard name for CPU and memory metrics |
| GRAFANA_HTTP_REQUESTS_DB | db/knative-serving-revision-http-requests | Grafana dashboard name for HTTP request metrics |
| ALLOWED_NAMESPACES | "" | Comma-separated list of namespaces to show in the namespace selector. If only one namespace is specified, it will be auto-selected and the dropdown will be hidden. Empty means all namespaces are shown. |

## Namespace Configuration

The application supports configuring which namespaces are available in the namespace selector. This is particularly useful for standalone deployments where you want to limit access to specific namespaces.

### Environment Variable
Set the `ALLOWED_NAMESPACES` environment variable with a comma-separated list of namespaces:

```bash
# Single namespace (auto-selected, dropdown hidden)
ALLOWED_NAMESPACES="kubeflow-user"

# Multiple namespaces (dropdown shows only these)
ALLOWED_NAMESPACES="kubeflow,kubeflow-user,production"
```

### Behavior
- **No configuration**: All namespaces are shown (default behavior)
- **Single namespace**: Namespace is auto-selected and dropdown is hidden
- **Multiple namespaces**: Dropdown shows only the specified namespaces
- **Error handling**: Falls back to all namespaces if specified ones don't exist

For detailed configuration options and examples, see [CONFIGURABLE_NAMESPACES.md](./CONFIGURABLE_NAMESPACES.md).

## Grafana Configuration

Expand Down
Loading
Loading