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

feat: initial rock implementation #1

Merged
merged 2 commits into from
Oct 3, 2023
Merged
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
43 changes: 43 additions & 0 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Based on https://github.com/metacontroller/metacontroller/blob/v2.0.4/Dockerfile
name: metacontroller
summary: Metacontroller in a ROCK.
description: "Metacontroller is an add-on for Kubernetes that makes it easy to write and deploy custom controllers in the form of simple scripts."
version: "2.0.4_22.04_1"
license: Apache-2.0
build-base: ubuntu:22.04
base: bare
run-user: _daemon_
services:
metacontroller:
command: metacontroller
working-dir: /usr/bin
override: replace
startup: enabled
platforms:
amd64:

parts:
metacontroller:
plugin: go
source: https://github.com/metacontroller/metacontroller
source-type: git
source-tag: "v2.0.4"
build-snaps:
- go/1.16/stable
build-environment:
- CGO_ENABLED: 0
stage-packages:
- ca-certificates
override-build: |
make install
mkdir -p ${CRAFT_PART_INSTALL}/usr/bin
install -D ${CRAFT_PART_INSTALL}/bin/metacontroller ${CRAFT_PART_INSTALL}/usr/bin

security-team-requirement:
plugin: nil
override-build: |
# security requirement
# there are no packages installed in `bare` base which is used in this rock
mkdir -p ${CRAFT_PART_INSTALL}/usr/share/rocks
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query") \
> ${CRAFT_PART_INSTALL}/usr/share/rocks/dpkg.query