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

Build #11

Closed
wants to merge 4 commits into from
Closed
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
28 changes: 28 additions & 0 deletions .github/workflows/build-extension-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and Release Extension Catalog

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash
working-directory: ./

jobs:
build-extension-catalog:
uses: rancher/dashboard/.github/workflows/build-extension-catalog.yml@master
permissions:
actions: write
contents: read
packages: write
with:
registry_target: ghcr.io
registry_user: ${{ github.actor }}
secrets:
registry_token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/build-extension-charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Release Extension Charts

on:
workflow_dispatch:
push:
branches:
- main

defaults:
run:
shell: bash
working-directory: ./

jobs:
build-extension-charts:
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
permissions:
actions: write
contents: write
deployments: write
pages: write
with:
target_branch: gh-pages
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typings/
.node_repl_history

# Output of 'npm pack'
*.tgz
#*.tgz

# Yarn Integrity file
.yarn-integrity
Expand Down
Binary file added assets/capi/capi-0.1.0.tgz
Binary file not shown.
23 changes: 23 additions & 0 deletions assets/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
entries:
capi:
- annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0'
catalog.cattle.io/namespace: cattle-ui-plugin-system
catalog.cattle.io/os: linux
catalog.cattle.io/permits-os: linux, windows
catalog.cattle.io/rancher-version: '>= v2.7.8'
catalog.cattle.io/scope: management
catalog.cattle.io/ui-component: plugins
apiVersion: v2
appVersion: 0.1.0
created: "2023-10-24T13:58:51.409462-07:00"
description: capi plugin
digest: a1c11eef2f31646e284ef33ff76d68707dc11256ee14e0cae1b91f75c2329d35
name: capi
type: application
urls:
- assets/capi/capi-0.1.0.tgz
version: 0.1.0
generated: "2023-10-24T13:58:51.40921-07:00"
15 changes: 15 additions & 0 deletions charts/capi/0.1.0/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0'
catalog.cattle.io/namespace: cattle-ui-plugin-system
catalog.cattle.io/os: linux
catalog.cattle.io/permits-os: linux, windows
catalog.cattle.io/rancher-version: '>= v2.7.8'
catalog.cattle.io/scope: management
catalog.cattle.io/ui-component: plugins
apiVersion: v2
appVersion: 0.1.0
description: capi plugin
name: capi
type: application
version: 0.1.0
52 changes: 52 additions & 0 deletions charts/capi/0.1.0/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "extension-server.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "extension-server.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}


{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "extension-server.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "extension-server.labels" -}}
helm.sh/chart: {{ include "extension-server.chart" . }}
{{ include "extension-server.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "extension-server.selectorLabels" -}}
app.kubernetes.io/name: {{ include "extension-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
12 changes: 12 additions & 0 deletions charts/capi/0.1.0/templates/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: catalog.cattle.io/v1
kind: UIPlugin
metadata:
name: {{ include "extension-server.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{ include "extension-server.labels" . | nindent 4 }}
spec:
plugin:
name: {{ include "extension-server.fullname" . }}
version: {{ (semver (default .Chart.AppVersion .Values.plugin.versionOverride)).Original }}
endpoint: https://raw.githubusercontent.com/https://github.com/rancher/capi-ui-extension.git/main/extensions/capi/0.1.0
noCache: {{ .Values.plugin.noCache }}
6 changes: 6 additions & 0 deletions charts/capi/0.1.0/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nameOverride: ""
fullnameOverride: ""
plugin:
enabled: true
versionOverride: ""
noCache: false
11 changes: 11 additions & 0 deletions extensions/capi/0.1.0/files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugin/capi-0.1.0.umd.min.2.js
plugin/capi-0.1.0.umd.min.2.js.map
plugin/capi-0.1.0.umd.min.3.js
plugin/capi-0.1.0.umd.min.3.js.map
plugin/capi-0.1.0.umd.min.4.js
plugin/capi-0.1.0.umd.min.4.js.map
plugin/capi-0.1.0.umd.min.formatters.js
plugin/capi-0.1.0.umd.min.formatters.js.map
plugin/capi-0.1.0.umd.min.js
plugin/capi-0.1.0.umd.min.js.map
plugin/package.json
2 changes: 2 additions & 0 deletions extensions/capi/0.1.0/plugin/capi-0.1.0.umd.min.2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extensions/capi/0.1.0/plugin/capi-0.1.0.umd.min.2.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions extensions/capi/0.1.0/plugin/capi-0.1.0.umd.min.3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extensions/capi/0.1.0/plugin/capi-0.1.0.umd.min.3.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions extensions/capi/0.1.0/plugin/capi-0.1.0.umd.min.4.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading