11 Commits

Author SHA1 Message Date
Eric Van Hensbergen
177f2a1d77 Update README.md
Add artifact hub badge

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2024-07-28 09:28:22 -05:00
Alexandre Peixoto Ferreira
4929d30fa9 Fix yaml for the new tag (#11)
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2024-07-28 09:18:48 -05:00
Alexandre Peixoto Ferreira
3418560744 Fix documentation for k3s/k8s usage of yaml files
Signed-off-by: Alexandre Peixoto Ferreira <alexandre.ferreira@arm.com>
2023-11-01 09:47:28 -05:00
Alexandre Peixoto Ferreira
6ebcbefa25 Fix CVE-2022-32149, just need recompile (#10)
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>

Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2022-11-22 08:42:28 -06:00
Alexandre Peixoto Ferreira
51fb12e8a0 Update chart version (#9)
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2022-11-16 14:54:45 -06:00
Alexandre Peixoto Ferreira
7effe1975a Remove last reference to gitlab (#8)
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2022-11-16 13:40:46 -06:00
Josh Minor
e386d5d7e0 Fix secrets in helm ci (#7)
Signed-off-by: Josh Minor <josh.minor@arm.com>
2022-11-09 09:32:08 -06:00
Josh Minor
7b03727989 Use common yaml for builds (#6)
* Use common yaml for builds

Signed-off-by: Josh Minor <josh.minor@arm.com>
2022-11-08 17:00:03 -06:00
Alexandre Peixoto Ferreira
91a0f95107 Remove references to gitlab (#5)
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2022-11-07 18:28:32 -06:00
Eric Van Hensbergen
321d7b5820 Switch Docker CI from gitlab to github
Adds buildx signing and helm chart publication.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2022-11-07 13:55:54 -06:00
Alexandre Peixoto Ferreira
3b4636fa30 Remove namespace so helm install it (#4)
* Remove namespace so helm install it

Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>

* Fix nodeSelector (Bug #9027 helm)

Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>

Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2022-11-07 12:45:38 -06:00
21 changed files with 59 additions and 307 deletions

View File

@@ -1,101 +0,0 @@
name: Docker Image BuildX CI and Publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: '19 16 * * *'
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
with:
cosign-release: 'v1.13.1'
-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2.2.1
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}

View File

@@ -0,0 +1,21 @@
name: Docker Image BuildX CI and Publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: "19 16 * * *"
push:
branches: ["main"]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
uses: smarter-project/reusable-workflows/.github/workflows/smarter-org-docker-buildx.yml@main

14
.github/workflows/smarter-org-helm.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
# release.yaml
name: Release Charts
on:
push:
branches:
- main
jobs:
release:
uses: smarter-project/reusable-workflows/.github/workflows/smarter-org-helm.yml@main
secrets:
GPG_KEYRING_BASE64: ${{ secrets.GPG_KEYRING_BASE64 }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

View File

@@ -1,5 +1,7 @@
# Enables k8s containers to access devices (linux device drivers) available on nodes
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/smarter-device-manager)](https://artifacthub.io/packages/search?repo=smarter-device-manager)
## Motivation
In the IoT world, interaction with the external environment is the reason of existence.
@@ -137,7 +139,7 @@ More than one smarter-device-manager can be used in a single node if required if
## Enabling Access
A few examples of yaml files are provided that enable the smarter-device-manager to be deployed in a node. The file smarter-device-management-pod-<>.yaml deploys a single pod on a node; this setup is useful for testing. The file smarter-device-manager-<>.yaml provides a deamonSet configuration that enables pods to be deployed in any node that contains the "smarter-device-manager=enabled" label. The following command inserts the daemonSet in Kubernetes. k3s and k8s put the unix sockets for the device plugin in different directories on the node so the \*-k8s.yaml files should be used on Kubernetes and the \*-k3s.yaml should be used on k3s.
A few examples of yaml files are provided that enable the smarter-device-manager to be deployed in a node. The file smarter-device-management-pod-<>.yaml deploys a single pod on a node; this setup is useful for testing. The file smarter-device-manager-<>.yaml provides a deamonSet configuration that enables pods to be deployed in any node that contains the "smarter-device-manager=enabled" label. The following command inserts the daemonSet in Kubernetes. Use the k8s for k8s/k3s/k0s unless using k3s version lower than 1.18. K3s smaller then 1.18 put the unix sockets for the device plugin in different directories on the node so the \*-k3s.yaml files should be used on k3s for those versions.
```
kubectl apply -f smarter-device-manager.yaml

View File

@@ -1,21 +1,17 @@
apiVersion: v2
name: smarter-device-manager
description: smarter-device-manager chart for SMARTER edge devices
home: https://gitlab.com/smarter-project/smarter-device-manager/helm
version: 0.0.3
appVersion: v1.20.11
home: https://getsmarter.io
version: 0.0.9
appVersion: v1.20.12
kubeVersion: ">=1.16.0-0"
keywords:
- kubernetes
- device
- hardware
sources:
- https://gitlab.com/smarter-project/smarter-device-manager
#dependencies:
# - name: smarter-common
# repository: https://gitlab.com/smarter-project/documentation
# version: 0.0.1
- https://github.com/smarter-project/smarter-device-manager
icon: https://github.com/smarter-project/documentation/raw/main/ARM1636_Project_Logo_ST2_RGB_V1.png
annotations:
artifacthub.io/changes: |
- Fix template
@@ -26,5 +22,5 @@ annotations:
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 82AD709FEC4ECA4C84B093889BDC9DE410CFC23B
url: https://keybase.io/alexandref75/pgp_keys.asc
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc

View File

@@ -6,9 +6,10 @@ For more information check out https://getsmarter.io
## TL;DR
Assumes that this repository was cloned.
```console
helm repo add smarter https://smarter-project.gitlab.io/documentation/charts
helm install my-smarter-device-manager smarter-device-manager --version 0.0.2
helm install --nsmespace=smarter --create-namespace my-smarter-device-manager charts/smarter-device-manager
```
## Overview

View File

@@ -4,7 +4,7 @@ application:
appName: smarter-device-manager
image:
repository: registry.gitlab.com/smarter-project/smarter-device-manager
repository: ghcr.io/smarter-project/smarter-device-manager
# @default -- chart.appVersion
tag: ""
pullPolicy: IfNotPresent

View File

@@ -36,7 +36,7 @@ function printHelp() {
}
BUILD_TAG=$(date -u "+%Y%m%d%H%M%S")
REPOSITORY_NAME="registry.gitlab.com/smarter-project/smarter-device-manager/"
REPOSITORY_NAME="ghcr.io/smarter-project/smarter-device-manager/"
IMAGE_NAME="smarter-device-manager"
DIRECTORY_TO_RUN=.

View File

@@ -1,181 +0,0 @@
apiVersion: v1
entries:
smarter-device-manager:
- annotations:
artifacthub.io/changes: |
- Fix template
- Add annotations
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Ferreira
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc
apiVersion: v2
appVersion: v1.20.12
created: "2022-11-22T14:42:55.980442932Z"
description: smarter-device-manager chart for SMARTER edge devices
digest: 9550de7af8b37ca7645c6b0db99a1e71ec3e2ee28f0e128b0daa09e1d8f34b45
home: https://getsmarter.io
icon: https://github.com/smarter-project/documentation/raw/main/ARM1636_Project_Logo_ST2_RGB_V1.png
keywords:
- kubernetes
- device
- hardware
kubeVersion: '>=1.16.0-0'
name: smarter-device-manager
sources:
- https://github.com/smarter-project/smarter-device-manager
urls:
- https://github.com/smarter-project/smarter-device-manager/releases/download/smarter-device-manager-0.0.9/smarter-device-manager-0.0.9.tgz
version: 0.0.9
- annotations:
artifacthub.io/changes: |
- Fix template
- Add annotations
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Ferreira
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc
apiVersion: v2
appVersion: v1.20.11
created: "2022-11-16T20:55:06.650821157Z"
description: smarter-device-manager chart for SMARTER edge devices
digest: e078454a543055896cd3a67c287a820e9595e6f56eb47db4ddbff77203f86d5f
home: https://getsmarter.io
icon: https://github.com/smarter-project/documentation/raw/main/ARM1636_Project_Logo_ST2_RGB_V1.png
keywords:
- kubernetes
- device
- hardware
kubeVersion: '>=1.16.0-0'
name: smarter-device-manager
sources:
- https://github.com/smarter-project/smarter-device-manager
urls:
- https://github.com/smarter-project/smarter-device-manager/releases/download/smarter-device-manager-0.0.8/smarter-device-manager-0.0.8.tgz
version: 0.0.8
- annotations:
artifacthub.io/changes: |
- Fix template
- Add annotations
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Ferreira
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc
apiVersion: v2
appVersion: v1.20.11
created: "2022-11-07T19:56:15.435518519Z"
description: smarter-device-manager chart for SMARTER edge devices
digest: 8d94e673a9302af53230a1e1d39dbedea111e08e63d03969079d566534dda725
home: https://getsmarter.io
icon: https://gitlab.com/uploads/-/system/group/avatar/59012546/ARM1636_Project_Logo_ST2_RGB_V1.png
keywords:
- kubernetes
- device
- hardware
kubeVersion: '>=1.16.0-0'
name: smarter-device-manager
sources:
- https://github.com/smarter-project/smarter-device-manager
urls:
- https://github.com/smarter-project/smarter-device-manager/releases/download/smarter-device-manager-0.0.7/smarter-device-manager-0.0.7.tgz
version: 0.0.7
- annotations:
artifacthub.io/changes: |
- Fix template
- Add annotations
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Ferreira
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc
apiVersion: v2
appVersion: v1.20.11
created: "2022-11-07T19:44:10.642325237Z"
description: smarter-device-manager chart for SMARTER edge devices
digest: 53fd6d0507516880af0535c4f1944310e743e670da2426597a1d3ec12b556dc9
home: https://github.com/smarter-device-manager
keywords:
- kubernetes
- device
- hardware
kubeVersion: '>=1.16.0-0'
name: smarter-device-manager
sources:
- https://github.com/smarter-project/smarter-device-manager
urls:
- https://github.com/smarter-project/smarter-device-manager/releases/download/smarter-device-manager-0.0.6/smarter-device-manager-0.0.6.tgz
version: 0.0.6
- annotations:
artifacthub.io/changes: |
- Fix template
- Add annotations
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Ferreira
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc
apiVersion: v2
appVersion: v1.20.11
created: "2022-11-07T19:35:56.132977927Z"
description: smarter-device-manager chart for SMARTER edge devices
digest: 94189b7b88ae07c91ec98672c87c9883b233dbfdbd68c853aa86ac4b49b6aec4
home: https://github.com/smarter-device-manager
keywords:
- kubernetes
- device
- hardware
kubeVersion: '>=1.16.0-0'
name: smarter-device-manager
sources:
- https://github.com/smarter-project/smarter-device-manager
urls:
- https://github.com/smarter-project/smarter-device-manager/releases/download/smarter-device-manager-0.0.5/smarter-device-manager-0.0.5.tgz
version: 0.0.5
- annotations:
artifacthub.io/changes: |
- Fix template
- Add annotations
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Ferreira
email: alexandref75@gmail.com
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 82AD709FEC4ECA4C84B093889BDC9DE410CFC23B
url: https://keybase.io/alexandref75/pgp_keys.asc
apiVersion: v2
appVersion: v1.20.11
created: "2022-11-07T18:52:52.020327868Z"
description: smarter-device-manager chart for SMARTER edge devices
digest: 2eab7b2ac3aa00e0e4f05dcb91c71fe8095ed1700a6540f5797e44f63f185d6a
home: https://gitlab.com/smarter-project/smarter-device-manager/helm
keywords:
- kubernetes
- device
- hardware
kubeVersion: '>=1.16.0-0'
name: smarter-device-manager
sources:
- https://gitlab.com/smarter-project/smarter-device-manager
urls:
- https://github.com/smarter-project/smarter-device-manager/releases/download/smarter-device-manager-0.0.4/smarter-device-manager-0.0.4.tgz
version: 0.0.4
generated: "2022-11-22T14:42:55.980469032Z"

View File

@@ -15,7 +15,7 @@ spec:
nodeName: smarter-jetson-xavier-4bcc2584
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -15,7 +15,7 @@ spec:
nodeName: <replace with node to run>
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -15,7 +15,7 @@ spec:
nodeName: <replace with node to run>
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -34,7 +34,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -34,7 +34,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -34,7 +34,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -34,7 +34,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -34,7 +34,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View File

@@ -34,7 +34,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager
image: registry.gitlab.com/smarter-project/smarter-device-manager:v1.20.11
image: ghcr.io/smarter-project/smarter-device-manager:v1.20.12
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false