Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Commodore committed Jun 29, 2020
0 parents commit 3cca3df
Show file tree
Hide file tree
Showing 24 changed files with 280 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: 🐜 Bug report
about: Create a report to help us improve 🔧

---

<!-- Place a general description or your issue here. -->

## Steps to Reproduce the Problem
<!-- Tell us how to reproduce your issue -->

1.
1.
1.

## Actual Behavior
<!-- What did happen as a result of the above? -->

## Expected Behavior
<!-- What is your expectation of the result? -->
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/02_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: 🚀 Feature request
about: Suggest an idea for this project 💡

---

## Context
<!--
Please let us know what you are trying to do and how you would want to do it differently?
Is it something you currently cannot do?
Is this related to an issue/problem?
-->

## Alternatives
<!--
Can you achieve the same result doing it in an alternative way?
Is the alternative considerable?
-->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: ❓ Help and Support RocketChat Channel
url: https://community.appuio.ch
about: Please ask and answer questions here. 🏥
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
Thank you for your pull request. Please provide a description above and
review the checklist below.
Contributors guide: ./CONTRIBUTING.md
-->

## Checklist
<!--
Remove items that do not apply. For completed items, change [ ] to [x].
-->

- [ ] Keep pull requests small so they can be easily reviewed.
- [ ] Update the documentation.
- [ ] Update the ./CHANGELOG.md.
- [ ] Link this PR to related issues.

<!--
NOTE: these things are not required to open a PR and can be done afterwards,
while the PR is open.
-->
18 changes: 18 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Pull Request
on:
pull_request:
branches:
- master

jobs:
linting:
runs-on: ubuntu-latest
strategy:
matrix:
command:
- lint_jsonnet
- lint_yaml
steps:
- uses: actions/checkout@v2
- name: Run ${{ matrix.command }}{}
run: make ${{ matrix.command }}{}
7 changes: 7 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: default

rules:
# 80 chars should be enough, but don't fail if a line is longer
line-length:
max: 80
level: warning
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added

-

[Unreleased]: https://github.com/appuio/component-openshift4-nodes/compare/v0.1.0...HEAD
4 changes: 4 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Code of Conduct

This code repository is part of Project Syn and the code of conduct at
https://syn.tools/syn/code_of_conduct.html does apply.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# How to contribute

This code repository is part of Project Syn and the contribution guide at
https://syn.tools/syn/contribution_guide.html does apply.

Submit Pull Requests at https://github.com/appuio/component-openshift4-nodes/pulls.
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright 2020, VSHN AG <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:

DOCKER_CMD ?= docker
DOCKER_ARGS ?= run --rm --user "$$(id -u)" -v "$${PWD}:/component" --workdir /component

JSONNET_FILES ?= $(shell find . -type f -name '*.*jsonnet' -or -name '*.libsonnet')
JSONNETFMT_ARGS ?= --in-place
JSONNET_IMAGE ?= docker.io/bitnami/jsonnet:latest
JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) --entrypoint=jsonnetfmt $(JSONNET_IMAGE)

YAML_FILES ?= $(shell find . -type f -name '*.yaml' -or -name '*.yml')
YAMLLINT_ARGS ?= --no-warnings
YAMLLINT_CONFIG ?= .yamllint.yml
YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest
YAMLLINT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(YAMLLINT_IMAGE)

.PHONY: all
all: lint

.PHONY: lint
lint: lint_jsonnet lint_yaml

.PHONY: lint_jsonnet
lint_jsonnet: $(JSONNET_FILES)
$(JSONNET_DOCKER) $(JSONNETFMT_ARGS) --test -- $?

.PHONY: lint_yaml
lint_yaml: $(YAML_FILES)
$(YAMLLINT_DOCKER) -f parsable -c $(YAMLLINT_CONFIG) $(YAMLLINT_ARGS) -- $?

.PHONY: format
format: format_jsonnet

.PHONY: format_jsonnet
format_jsonnet: $(JSONNET_FILES)
$(JSONNET_DOCKER) $(JSONNETFMT_ARGS) -- $?
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Commodore Component: OpenShift 4 Machine Management

This is a [Commodore][commodore] Component for OpenShift 4 Machine Management.

This repository is part of Project Syn.
For documentation on Project Syn and this component, see https://syn.tools.

## Documentation

Documentation for this component is written using [Asciidoc][asciidoc] and [Antora][antora].
It is located in the [docs/](docs) folder.
The [Divio documentation structure](https://documentation.divio.com/) is used to organize its content.

## Contributing and license

This library is licensed under [BSD-3-Clause](LICENSE).
For information about how to contribute see [CONTRIBUTING](CONTRIBUTING.md).

[commodore]: https://docs.syn.tools/commodore/index.html
[asciidoc]: https://asciidoctor.org/
[antora]: https://antora.org/
3 changes: 3 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
parameters:
openshift4_nodes:
namespace: syn-openshift4-nodes
11 changes: 11 additions & 0 deletions class/openshift4-nodes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
parameters:
kapitan:
compile:
- input_paths:
- openshift4-nodes/component/app.jsonnet
input_type: jsonnet
output_path: apps/
- input_paths:
- openshift4-nodes/component/main.jsonnet
input_type: jsonnet
output_path: openshift4-nodes/
10 changes: 10 additions & 0 deletions component/app.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local kap = import 'lib/kapitan.libjsonnet';
local inv = kap.inventory();
local params = inv.parameters.openshift4_nodes;
local argocd = import 'lib/argocd.libjsonnet';

local app = argocd.App('openshift4-nodes', params.namespace);

{
'openshift4-nodes': app,
}
10 changes: 10 additions & 0 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// main template for openshift4-nodes
local kap = import 'lib/kapitan.libjsonnet';
local kube = import 'lib/kube.libjsonnet';
local inv = kap.inventory();
// The hiera parameters for the component
local params = inv.parameters.openshift4_nodes;

// Define outputs below
{
}
6 changes: 6 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: openshift4-nodes
title: OpenShift 4 Machine Management
version: master
start_page: ROOT:index.adoc
nav:
- modules/ROOT/partials/nav.adoc
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= OpenShift 4 Machine Management: A Commodore component to manage OpenShift 4 Machine Management

{doctitle} is a Commodore component for Managing OpenShift 4 Machine Management.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions docs/modules/ROOT/partials/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:index.adoc[Home]
36 changes: 36 additions & 0 deletions playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
site:
title: "OpenShift 4 Machine Management"
url: https://syn.tools/
start_page: openshift4-nodes::index.adoc
robots: disallow
content:
sources:
- url: .
branches: HEAD
start_path: docs
edit_url: 'https://github.com/appuio/component-openshift4-nodes/edit/master/{path}'
ui:
bundle:
url: https://github.com/vshn/antora-ui-default/releases/download/1.6/ui-bundle.zip
snapshot: false
asciidoc:
attributes:
toc: 'auto'
toc-title: ''
toclevels: 2
hide-uri-scheme: ''
experimental: ''
stem: ''
icons: font
kroki-server-url: https://vshn-kroki.appuioapp.ch
kroki-fetch-diagram: ''
extensions:
- asciidoctor-kroki
output:
destinations:
- provider: fs
path: ./_public
clean: true
- provider: archive
path: ./_archive/site.zip
clean: true

0 comments on commit 3cca3df

Please sign in to comment.