-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: [email protected] <[email protected]>
- Loading branch information
1 parent
fd1835b
commit 553c3aa
Showing
9 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Chart Rdma Tools | ||
|
||
env: | ||
CHART_PATH: rdma-tools/chart | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: 'tag, sha, branch' | ||
required: true | ||
default: main | ||
push: | ||
tags: | ||
- rdma-tools-v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
get_info: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
chart_path: ${{ env.chart_path }} | ||
code_sha: ${{ env.code_sha }} | ||
steps: | ||
- name: Get information | ||
id: get_original_ref | ||
run: | | ||
echo '${{ toJSON(github) }}' | ||
if ${{ github.event_name == 'workflow_dispatch' }}; then | ||
echo "call by workflow_dispatch" | ||
echo "code_sha=${{ github.event.inputs.ref }}" >> $GITHUB_ENV | ||
echo "chart_path=${{ env.CHART_PATH }}" >> $GITHUB_ENV | ||
elif ${{ github.event_name == 'push' }} ; then | ||
echo "call by push tag" | ||
echo "code_sha=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
echo "chart_path=${{ env.CHART_PATH }}" >> $GITHUB_ENV | ||
else | ||
exit 1 | ||
fi | ||
call-workflow: | ||
needs: [get_info] | ||
uses: ./.github/workflows/callBuildChart.yaml | ||
with: | ||
code_sha: ${{ needs.get_info.outputs.code_sha }} | ||
chart_path: ${{ needs.get_info.outputs.chart_path }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v2 | ||
name: rdma-tools | ||
home: "https://spidernet-io.github.io/charts" | ||
#icon: | ||
# application or library | ||
type: application | ||
# no need to modify this version , CI will auto update it with /VERSION | ||
version: 0.1.0 | ||
# This field is informational, and has no impact on chart version calculations . | ||
# Leaving it unquoted can lead to parsing issues in some cases | ||
# no need to modify this version , CI will auto update it with /VERSION | ||
appVersion: "0.1.0" | ||
kubeVersion: ">= 1.16.0-0" | ||
description: rdma test | ||
sources: | ||
- "https://spidernet-io.github.io/charts" | ||
keywords: | ||
- rdma | ||
- networking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# rdma tools | ||
|
||
test rdma networks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Renders a value that contains template. | ||
Usage: | ||
{{ include "tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} | ||
*/}} | ||
{{- define "tplvalues.render" -}} | ||
{{- if typeIs "string" .value }} | ||
{{- tpl .value .context }} | ||
{{- else }} | ||
{{- tpl (.value | toYaml) .context }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
|
||
{{/* | ||
return the image | ||
*/}} | ||
{{- define "project.image" -}} | ||
{{- $registryName := .Values.image.registry -}} | ||
{{- $repositoryName := .Values.image.repository -}} | ||
{{ if $registryName }} | ||
{{- printf "%s/%s" $registryName $repositoryName -}} | ||
{{- else -}} | ||
{{- printf "%s" $repositoryName -}} | ||
{{- end -}} | ||
{{- if .Values.image.tag -}} | ||
{{- printf ":%s" .Values.image.tag -}} | ||
{{- else -}} | ||
{{- printf ":v%s" .Chart.AppVersion -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ .Values.name | trunc 63 | trimSuffix "-" }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Values.name | trunc 63 | trimSuffix "-" }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.name | trunc 63 | trimSuffix "-" }} | ||
updateStrategy: | ||
type: OnDelete | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.name | trunc 63 | trimSuffix "-" }} | ||
{{- if .Values.extraAnnotations }} | ||
annotations: | ||
{{- include "tplvalues.render" ( dict "value" .Values.extraAnnotations "context" $ ) | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.image.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- with .Values.image.imagePullSecrets }} | ||
{{- toYaml . | trim | nindent 6 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.hostnetwork }} | ||
hostNetwork: true | ||
dnsPolicy: ClusterFirstWithHostNet | ||
{{- else }} | ||
hostNetwork: false | ||
dnsPolicy: ClusterFirst | ||
{{- end }} | ||
restartPolicy: Always | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.affinity }} | ||
affinity: | ||
{{- include "tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 6 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Values.name | trunc 63 | trimSuffix "-" }} | ||
image: {{ include "project.image" . | quote }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
{{- with .Values.resources }} | ||
resources: | ||
{{- toYaml . | trim | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.securityContext }} | ||
securityContext: | ||
{{- with .Values.securityContext }} | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- end }} | ||
env: | ||
- name: ENV_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: ENV_LOCAL_NODE_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.hostIP | ||
- name: ENV_LOCAL_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: ENV_POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
{{- with .Values.extraEnv }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.extraVolumes }} | ||
volumeMounts: | ||
{{- if .Values.extraVolumes }} | ||
{{- include "tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 12 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.extraVolumes }} | ||
volumes: | ||
{{- if .Values.extraVolumeMounts }} | ||
{{- include "tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 6 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: rdma-test | ||
|
||
image: | ||
registry: ghcr.io | ||
repository: spidernet-io/rdma-tools | ||
tag: "" | ||
|
||
pullPolicy: IfNotPresent | ||
imagePullSecrets: [] | ||
|
||
hostnetwork: false | ||
tolerations: [] | ||
|
||
nodeSelector: | ||
kubernetes.io/os: linux | ||
|
||
affinity: {} | ||
|
||
resources: | ||
#limits: | ||
# spidernet.io/gpu1sriov: 1 | ||
requests: | ||
cpu: 200m | ||
memory: 150Mi | ||
|
||
extraAnnotations: | ||
#v1.multus-cni.io/default-network: spiderpool/calico | ||
#k8s.v1.cni.cncf.io/networks: | | ||
# '[{"name":"gpu1-sriov","namespace":"spiderpool"}, | ||
# {"name":"gpu2-sriov","namespace":"spiderpool"}, | ||
# {"name":"gpu8-sriov","namespace":"spiderpool"}]' | ||
|
||
securityContext: | ||
#capabilities: | ||
# add: [ "IPC_LOCK" ] | ||
|
||
extraEnv: [] | ||
|
||
extraVolumes: [] | ||
# - name: test-val | ||
# mountPath: /host/tmp | ||
|
||
extraVolumeMounts: [] | ||
# - name: test-val | ||
# mountPath: /tmp |