This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Add snap package definition #71
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d2f04ed
Add basic snapcraft.yaml
fbarl 5fac1ed
Inject the wksctl version
fbarl 3f29085
Removed redundant build-packages
fbarl 07a373c
Switched to classic confinement
fbarl fd5bb94
Rename Subscription -> System
fbarl 38fe083
Reverted to strict confinement
fbarl 0568bcb
Tightened kube-config interface but give write permissions to .wks dir
fbarl 3884700
Add removable-media interface
fbarl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -30,3 +30,6 @@ tf.json | |
|
||
# Docs | ||
docs/_build | ||
|
||
# Snap images | ||
*.snap |
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: wksctl | ||
version: git | ||
summary: Open Source Weaveworks Kubernetes System | ||
description: > | ||
wksctl allows simple creation of a Kubernetes cluster given a set of IP addresses and an SSH key. It | ||
can be run in a standalone environment but is best used via a GitOps approach in which cluster and | ||
machine descriptions are stored in Git and the state of the cluster tracks changes to the descriptions. | ||
|
||
Its features include simple creation of Kubernetes clusters, manage cluster and machine descriptions using Git, | ||
manage addons like Weave Net or Flux, Sealed Secret integration | ||
|
||
confinement: strict | ||
grade: stable | ||
base: core18 | ||
|
||
parts: | ||
wksctl: | ||
source: . | ||
# Don't use go plugin because it doesn't seem to work with Go modules | ||
plugin: nil | ||
override-build: | | ||
export GOBIN=$SNAPCRAFT_PART_INSTALL/bin | ||
export VERSION=$(git tag -l | egrep -v '^(chart-|helm-|master-|pre-split|[a-z])' | sort --version-sort | tail -n1) | ||
go build -ldflags "-X github.com/weaveworks/wksctl/pkg/version.Version=$VERSION" -o $GOBIN/wksctl ./cmd/wksctl | ||
build-environment: | ||
- GO111MODULE: 'on' | ||
- CGO_ENABLED: '0' | ||
build-snaps: | ||
- go/1.12/stable | ||
|
||
plugs: | ||
kube-config: | ||
interface: personal-files | ||
write: | ||
- $HOME/.wks | ||
|
||
apps: | ||
wksctl: | ||
command: bin/wksctl | ||
plugs: | ||
- kube-config | ||
- removable-media | ||
- home | ||
- network | ||
- network-bind |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/fluxcd/flux/blame/master/snap/snapcraft.yaml#L23-L37 might be helpful for automatically getting you the version.