Skip to content
Merged
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
67 changes: 67 additions & 0 deletions dashboard/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Git
.git
.gitignore

# Documentation
README.md
CODE_OF_CONDUCT.md
OWNERS
*.md
*.excalidraw

# Development files
.env*
.cursor/
.test/
.vscode/
.idea/

# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Build outputs
dist/
build/
*.tgz
*.tar.gz

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Temporary files
*.tmp
*.temp
*.log

# IDE files
*.swp
*.swo
*~

# Test files
coverage/
*.test
*.spec.js
*.spec.ts

# Backend specific
backend/vendor/
backend/*.test
backend/coverage.out

# Makefile and scripts
Makefile
*.sh

# License
LICENSE
3 changes: 3 additions & 0 deletions dashboard/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Development environment settings
VITE_API_BASE=
VITE_USE_REAL_API=true
3 changes: 3 additions & 0 deletions dashboard/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Production environment settings
VITE_API_BASE=
VITE_USE_REAL_API=true
25 changes: 25 additions & 0 deletions dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.kubeconfig
44 changes: 44 additions & 0 deletions dashboard/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# CNCF Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect and consider the needs of everyone and be respectful at all times.

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, political ideology, race, religion, or sexual orientation.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive feedback
- Showing empathy toward other community members
- Focusing on what is best for the community as a whole

Examples of unacceptable behavior by participants include:

- Harassing language or imagery in public or private messages
- Personal insults, insults based on identity or background, and unwelcome sexual attention
- Trolling, insulting/derogatory comments, and direct or veiled threats
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, including code repositories, mailing lists, chat channels, and issue trackers, as well as at in-person and virtual events related to the project.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [INSERT EMAIL ADDRESS]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter.

Instances of unacceptable behavior may also be reported to the CNCF Code of Conduct Committee at conduct@cncf.io.

## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html, and the CNCF Code of Conduct, available at https://github.com/cncf/foundation/blob/master/code-of-conduct.md.
48 changes: 48 additions & 0 deletions dashboard/Dockerfile.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# APISERVER Dockerfile for OCM Dashboard API
FROM golang:1.24-alpine AS builder

# Install git and ca-certificates (needed for go modules and HTTPS)
RUN apk add --no-cache git ca-certificates

# Set working directory
WORKDIR /app

# Copy go mod files
COPY apiserver/go.mod apiserver/go.sum ./

# Download dependencies
RUN go mod download

# Copy apiserver source
COPY apiserver/ ./

# Build the binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags='-w -s -extldflags "-static"' \
-a -installsuffix cgo \
-o apiserver \
main.go

# Final runtime image
FROM gcr.io/distroless/static:nonroot

# Copy ca-certificates from builder
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

# Copy apiserver binary
COPY --from=builder /app/apiserver /app/apiserver

# Set working directory
WORKDIR /app

# Use non-root user
USER nonroot:nonroot

# Expose port
EXPOSE 8080

# Set environment variables
ENV GIN_MODE=release

# Run the application
ENTRYPOINT ["/app/apiserver"]
54 changes: 54 additions & 0 deletions dashboard/Dockerfile.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Frontend Dockerfile for OCM Dashboard UI
FROM node:22-alpine AS builder

# Set working directory
WORKDIR /app

# Copy package files
COPY package*.json ./
COPY pnpm-lock.yaml ./

# Install dependencies
RUN npm install -g pnpm && pnpm install --frozen-lockfile

# Copy source code
COPY . .

# Build frontend
RUN pnpm run build

# Production stage with golang and gin
FROM golang:1.24-alpine AS server

# Set working directory
WORKDIR /app

# Copy uiserver directory
COPY uiserver/ ./

# Download Go dependencies
RUN go mod download

# Build Go server
RUN go build -o uiserver uiserver.go

# Final stage
FROM alpine:latest

# Install ca-certificates for HTTPS requests
RUN apk --no-cache add ca-certificates

# Set working directory
WORKDIR /app

# Copy built assets from builder stage
COPY --from=builder /app/dist ./dist

# Copy Go server binary from server stage
COPY --from=server /app/uiserver ./

# Expose port 3000
EXPOSE 3000

# Start the Go server
CMD ["./uiserver"]
121 changes: 121 additions & 0 deletions dashboard/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

2. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent license
to make, have made, use, offer to sell, sell, import, and otherwise transfer
the Work, where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their Contribution(s)
alone or by combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes
direct or contributory patent infringement, then any patent licenses granted
to You under this License for that Work shall terminate as of the date such
litigation is filed.

3. Redistribution.
You may reproduce and distribute copies of the Work or Derivative
Works thereof in any medium, with or without modifications, and in
Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative
Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a file named "NOTICE" with a notice
text, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be
construed as modifying the License.

4. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally
submitted for inclusion in the Work by You to the Licensor shall be
under the terms and conditions of this License, without any
additional terms or conditions. Notwithstanding the above,
nothing herein shall supersede or modify the terms of any separate
license agreement between You and the Licensor regarding such
Contributions.

5. Trademarks.
This License does not grant permission to use the trade names,
trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing
the origin of the Work and reproducing the content of the NOTICE
file.

6. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor
provides the Work (and each Contributor provides its Contributions)
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied, including, but not limited to, any
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY,
or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible
for determining the appropriateness of using or redistributing
the Work and assume any risks associated with Your exercise
of permissions under this License.

7. Limitation of Liability.
In no event and under no legal theory, whether in tort (including
negligence), contract, or otherwise, unless required by applicable law
(such as deliberate and grossly negligent acts) or agreed to in writing,
shall any Contributor be liable to You for damages, including any
direct, indirect, special, incidental, or consequential damages of
any character arising as a result of this License or out of the use
or inability to use the Work (including but not limited to damages
for loss of goodwill, work stoppage, computer failure or malfunction,
or any and all other commercial damages or losses), even if such
Contributor has been advised of the possibility of such damages.

8. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof,
You may choose to offer, and charge a fee for, acceptance of
support, warranty, indemnity, or other liability obligations and/or
rights consistent with this License. However, in such cases,
You must make it absolutely clear that any such warranty,
indemnity, or other such obligations are offered by You alone,
and You hereby disclaim any such warranty, indemnity, or other
liability obligations to the extent permitted by law. You may also
include additional disclaimers of warranty and limitation of
liability provisions specific to any jurisdiction.

END OF TERMS AND CONDITIONS

Copyright 2025 Open Cluster Management Community

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading