Skip to content

Commit 82c0ee7

Browse files
authored
Merge pull request #4 from appuio/modulesync-17389b2
[ModuleSync] Update from projectsyn/modulesync-control@17389b2
2 parents 5afd097 + deb5a4f commit 82c0ee7

17 files changed

+249
-53
lines changed

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
;
2+
; File managed by ModuleSync - Do Not Edit
3+
;
4+
; This file is for unifying the coding style for different editors and IDEs.
5+
; More information at https://editorconfig.org
6+
7+
root = true
8+
9+
[*]
10+
charset = utf-8
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.{y*ml,*json}]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.*sonnet]
20+
# C-style doc comments
21+
block_comment_start = /*
22+
block_comment = *
23+
block_comment_end = */
24+
25+
[.gitkeep]
26+
insert_final_newline = false
27+
28+
[Makefile]
29+
indent_style = tab

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
<!--
2-
Thank you for your pull request. Please provide a description above and
3-
review the checklist below.
41

5-
Contributors guide: ./CONTRIBUTING.md
6-
-->
2+
73

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

13-
- [ ] Keep pull requests small so they can be easily reviewed.
6+
- [ ] PR contains a single logical change (to build a better changelog).
147
- [ ] Update the documentation.
15-
- [ ] Update the ./CHANGELOG.md.
16-
- [ ] Link this PR to related issues.
8+
- [ ] Categorize the PR by setting a good title and adding one of the labels:
9+
`bug`, `enhancement`, `documentation`, `change`, `breaking`, `dependency`
10+
as they show up in the changelog.
11+
- [ ] Link this PR to related issues or PRs.
1712

1813
<!--
19-
NOTE: these things are not required to open a PR and can be done afterwards,
14+
Thank you for your pull request. Please provide a description above and
15+
review the checklist.
16+
17+
Contributors guide: ./CONTRIBUTING.md
18+
19+
Remove items that do not apply. For completed items, change [ ] to [x].
20+
These things are not required to open a PR and can be done afterwards,
2021
while the PR is open.
2122
-->

.github/changelog-configuration.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
3+
"categories": [
4+
{
5+
"title": "## 🚀 Features",
6+
"labels": ["enhancement", "feature"]
7+
},
8+
{
9+
"title": "## 🛠️ Minor Changes",
10+
"labels": ["change"]
11+
},
12+
{
13+
"title": "## 🔎 Breaking Changes",
14+
"labels": ["breaking"]
15+
},
16+
{
17+
"title": "## 🐛 Fixes",
18+
"labels": ["bug", "fix"]
19+
},
20+
{
21+
"title": "## 📄 Documentation",
22+
"labels": ["documentation"]
23+
},
24+
{
25+
"title": "## 🔗 Dependency Updates",
26+
"labels": ["dependency"]
27+
}
28+
],
29+
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}"
30+
}

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
7+
jobs:
8+
dist:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: "0"
14+
- name: Build changelog from PRs with labels
15+
id: build_changelog
16+
uses: mikepenz/release-changelog-builder-action@v2
17+
with:
18+
configuration: ".github/changelog-configuration.json"
19+
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
20+
# combining possible changelogs of all previous PreReleases in between.
21+
# PreReleases show a partial changelog since last PreRelease.
22+
ignorePreReleases: "${{ !contains(github.ref, '-rc') }}"
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Create Release
26+
uses: ncipollo/release-action@v1
27+
with:
28+
body: ${{steps.build_changelog.outputs.changelog}}
29+
prerelease: "${{ contains(github.ref, '-rc') }}"
30+
# Ensure target branch for release is "master"
31+
commit: master
32+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches:
55
- master
66

7+
env:
8+
COMPONENT_NAME: openshift4-scheduling
9+
710
jobs:
811
linting:
912
runs-on: ubuntu-latest
@@ -12,7 +15,26 @@ jobs:
1215
command:
1316
- lint_jsonnet
1417
- lint_yaml
18+
- lint_adoc
1519
steps:
1620
- uses: actions/checkout@v2
1721
- name: Run ${{ matrix.command }}
1822
run: make ${{ matrix.command }}
23+
editorconfig:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: snow-actions/eclint@v1.0.1
28+
with:
29+
args: 'check'
30+
test:
31+
runs-on: ubuntu-latest
32+
defaults:
33+
run:
34+
working-directory: ${{ env.COMPONENT_NAME }}
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
path: ${{ env.COMPONENT_NAME }}
39+
- name: Compile component
40+
run: make test

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# File managed by ModuleSync - Do Not Edit
3+
#
4+
# Additional entries can be added to `.sync.yml` in '.gitignore.additionalEntries'
5+
#
6+
7+
# Commodore
8+
.cache/
9+
helmcharts/
10+
manifests/
11+
vendor/
12+
jsonnetfile.lock.json
13+
crds/
14+
compiled/
15+
16+
# Antora
17+
_archive/
18+
_public/
19+
20+
# Additional entries

.yamllint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1+
#
2+
# File managed by ModuleSync - Do Not Edit
3+
#
4+
15
extends: default
26

37
rules:
48
# 80 chars should be enough, but don't fail if a line is longer
59
line-length:
610
max: 80
711
level: warning
12+
13+
ignore: |
14+
dependencies/
15+
helmcharts/
16+
manifests/
17+
vendor/
18+
compiled/

CHANGELOG.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Code of Conduct
22

33
This code repository is part of Project Syn and the code of conduct at
4-
https://syn.tools/syn/code_of_conduct.html does apply.
4+
https://syn.tools/syn/about/code_of_conduct.html does apply.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to contribute
22

33
This code repository is part of Project Syn and the contribution guide at
4-
https://syn.tools/syn/contribution_guide.html does apply.
4+
https://syn.tools/syn/about/contribution_guide.html does apply.
55

66
Submit Pull Requests at https://github.com/appuio/component-openshift4-scheduling/pulls.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2020, VSHN AG <info@vshn.ch>
1+
Copyright 2021, VSHN AG <info@vshn.ch>
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

Makefile

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,60 @@
1+
#
2+
# File managed by ModuleSync - Do Not Edit
3+
#
4+
# Additional Makefiles can be added to `.sync.yml` in 'Makefile.includes'
5+
#
6+
17
MAKEFLAGS += --warn-undefined-variables
28
SHELL := bash
39
.SHELLFLAGS := -eu -o pipefail -c
410
.DEFAULT_GOAL := all
511
.DELETE_ON_ERROR:
612
.SUFFIXES:
713

8-
DOCKER_CMD ?= docker
9-
DOCKER_ARGS ?= run --rm --user "$$(id -u)" -v "$${PWD}:/component" --workdir /component
10-
11-
JSONNET_FILES ?= $(shell find . -type f -name '*.*jsonnet' -or -name '*.libsonnet')
12-
JSONNETFMT_ARGS ?= --in-place
13-
JSONNET_IMAGE ?= docker.io/bitnami/jsonnet:latest
14-
JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) --entrypoint=jsonnetfmt $(JSONNET_IMAGE)
15-
16-
YAML_FILES ?= $(shell find . -type f -name '*.yaml' -or -name '*.yml')
17-
YAMLLINT_ARGS ?= --no-warnings
18-
YAMLLINT_CONFIG ?= .yamllint.yml
19-
YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest
20-
YAMLLINT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(YAMLLINT_IMAGE)
21-
22-
VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) --volume "$${PWD}"/docs/modules:/pages vshn/vale:2.1.1
23-
VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages
14+
include Makefile.vars.mk
2415

16+
.PHONY: help
17+
help: ## Show this help
18+
@grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: ).*?## "}; {gsub(/\\:/,":", $$1)}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
2519

2620
.PHONY: all
2721
all: lint
2822

2923
.PHONY: lint
30-
lint: lint_jsonnet lint_yaml lint_adoc
24+
lint: lint_jsonnet lint_yaml lint_adoc ## All-in-one linting
3125

3226
.PHONY: lint_jsonnet
33-
lint_jsonnet: $(JSONNET_FILES)
27+
lint_jsonnet: $(JSONNET_FILES) ## Lint jsonnet files
3428
$(JSONNET_DOCKER) $(JSONNETFMT_ARGS) --test -- $?
3529

3630
.PHONY: lint_yaml
37-
lint_yaml: $(YAML_FILES)
38-
$(YAMLLINT_DOCKER) -f parsable -c $(YAMLLINT_CONFIG) $(YAMLLINT_ARGS) -- $?
31+
lint_yaml: ## Lint yaml files
32+
$(YAMLLINT_DOCKER) -f parsable -c $(YAMLLINT_CONFIG) $(YAMLLINT_ARGS) -- .
3933

4034
.PHONY: lint_adoc
41-
lint_adoc:
35+
lint_adoc: ## Lint documentation
4236
$(VALE_CMD) $(VALE_ARGS)
4337

4438
.PHONY: format
45-
format: format_jsonnet
39+
format: format_jsonnet ## All-in-one formatting
4640

4741
.PHONY: format_jsonnet
48-
format_jsonnet: $(JSONNET_FILES)
42+
format_jsonnet: $(JSONNET_FILES) ## Format jsonnet files
4943
$(JSONNET_DOCKER) $(JSONNETFMT_ARGS) -- $?
44+
45+
.PHONY: docs-serve
46+
docs-serve: ## Preview the documentation
47+
$(ANTORA_PREVIEW_CMD)
48+
49+
.PHONY: compile
50+
.compile:
51+
mkdir -p dependencies
52+
$(COMMODORE_CMD)
53+
54+
.PHONY: test
55+
test: commodore_args += -f tests/$(instance).yml
56+
test: .compile ## Compile the component
57+
58+
.PHONY: clean
59+
clean: ## Clean the project
60+
rm -rf .cache compiled dependencies vendor helmcharts jsonnetfile*.json || true

Makefile.vars.mk

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# File managed by ModuleSync - Do Not Edit
3+
#
4+
# Additional Makefiles can be added to `.sync.yml` in 'Makefile.includes'
5+
#
6+
7+
# Commodore takes the root dir name as the component name
8+
COMPONENT_NAME ?= $(shell basename ${PWD} | sed s/component-//)
9+
10+
compiled_path ?= compiled/$(COMPONENT_NAME)/$(COMPONENT_NAME)
11+
root_volume ?= -v "$${PWD}:/$(COMPONENT_NAME)"
12+
compiled_volume ?= -v "$${PWD}/$(compiled_path):/$(COMPONENT_NAME)"
13+
commodore_args ?= --search-paths ./dependencies --search-paths .
14+
15+
DOCKER_CMD ?= docker
16+
DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)"
17+
18+
JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/*' \( -name '*.*jsonnet' -or -name '*.libsonnet' \))
19+
JSONNETFMT_ARGS ?= --in-place --pad-arrays
20+
JSONNET_IMAGE ?= docker.io/bitnami/jsonnet:latest
21+
JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=jsonnetfmt $(JSONNET_IMAGE)
22+
23+
YAMLLINT_ARGS ?= --no-warnings
24+
YAMLLINT_CONFIG ?= .yamllint.yml
25+
YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest
26+
YAMLLINT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) $(YAMLLINT_IMAGE)
27+
28+
VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --volume "$${PWD}"/docs/modules:/pages docker.io/vshn/vale:2.1.1
29+
VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages
30+
31+
ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 2020:2020 --volume "${PWD}":/antora docker.io/vshn/antora-preview:2.3.3 --style=syn --antora=docs
32+
33+
COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) docker.io/projectsyn/commodore:latest component compile . $(commodore_args)
34+
JB_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) --entrypoint /usr/local/bin/jb docker.io/projectsyn/commodore:latest install
35+
36+
instance ?= defaults

docs/antora.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#
2+
# File managed by ModuleSync - Do Not Edit
3+
#
4+
# The name and title can be customized in `.sync.yml` with `'docs/antora.yml'.title`, `'docs/antora.yml'.name`
5+
#
6+
17
name: openshift4-scheduling
28
title: OpenShift4 Scheduler
39
version: master

docs/modules/ROOT/pages/references/parameters.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ See the https://docs.openshift.com/container-platform/latest/nodes/scheduling/no
1616

1717
To unset all scheduling configurations, set to `null`.
1818

19-
NOTE: This will make the scheduling unmanaged but will not reset them to OpenShift defaults.
19+
NOTE: This will make the scheduling configuration unmanaged by the component, but won't reset changed values to the OpenShift defaults.
2020

2121

2222
== Example

renovate.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":gitSignOff",
5+
":disableDependencyDashboard"
6+
],
7+
"labels": [
8+
"dependency"
9+
]
10+
}

tests/defaults.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
parameters:
2+
openshift4_scheduling: {}

0 commit comments

Comments
 (0)