Skip to content

Commit 0186018

Browse files
committed
Initial commit
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
0 parents  commit 0186018

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3838
-0
lines changed

.dmtlint.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
linters-settings:
2+
container:
3+
exclude-rules:
4+
liveness-probe:
5+
- kind: Deployment
6+
name: snapshot-controller
7+
container: kube-rbac-proxy
8+
- kind: Deployment
9+
name: snapshot-controller
10+
container: snapshot-controller
11+
- kind: Deployment
12+
name: snapshot-controller
13+
container: snapshot-validation
14+
- kind: Deployment
15+
name: snapshot-validation-webhook
16+
container: snapshot-validation
17+
readiness-probe:
18+
- kind: Deployment
19+
name: snapshot-controller
20+
container: kube-rbac-proxy
21+
- kind: Deployment
22+
name: snapshot-controller
23+
container: snapshot-controller
24+
- kind: Deployment
25+
name: snapshot-controller
26+
container: snapshot-validation
27+
- kind: Deployment
28+
name: snapshot-validation-webhook
29+
container: snapshot-validation
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: 🎯 Bug report
2+
description: Report a bug to help us improve Deckhouse
3+
labels:
4+
- 'type/bug'
5+
- 'status/needs-triage'
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thank you for submitting a bug report!
11+
12+
Please fill out the template below to make it easier to debug your problem.
13+
- type: checkboxes
14+
attributes:
15+
label: Preflight Checklist
16+
description: Please ensure you've completed all of the following.
17+
options:
18+
- label: I agree to follow the [Code of Conduct](https://github.com/deckhouse/deckhouse/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
19+
required: true
20+
- label: I have searched the [issue tracker](https://github.com/deckhouse/deckhouse/issues) for an issue that matches the one I want to file, without success.
21+
required: true
22+
- type: input
23+
attributes:
24+
label: Version
25+
description: |
26+
What version of Deckhouse are you running?
27+
placeholder: v1.0.0
28+
validations:
29+
required: true
30+
- type: textarea
31+
attributes:
32+
label: Expected Behavior
33+
description: A clear and concise description of what you expected to happen.
34+
validations:
35+
required: true
36+
- type: textarea
37+
attributes:
38+
label: Actual Behavior
39+
description: A clear description of what actually happens.
40+
validations:
41+
required: true
42+
- type: textarea
43+
attributes:
44+
label: Steps To Reproduce
45+
description: Steps to reproduce the behavior if it is not self-explanatory.
46+
placeholder: |
47+
1. In this environment...
48+
2. With this config...
49+
3. Run '...'
50+
4. See error...
51+
- type: textarea
52+
attributes:
53+
label: Additional Information
54+
description: Links? References? Anything that will give us more context about the issue that you are encountering!
55+
- type: textarea
56+
attributes:
57+
label: Logs
58+
description: Deckhouse application logs (if relevant).
59+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 📚 Documentation
4+
url: https://deckhouse.io/documentation/
5+
about: Check the documentation for help
6+
7+
- name: 💬 Telegram channel [EN]
8+
url: https://t.me/deckhouse
9+
about: Please ask and answer questions here
10+
11+
- name: 🇷🇺 Telegram channel [RU]
12+
url: https://t.me/deckhouse_ru
13+
about: Please ask and answer questions here
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 💡 Feature request
2+
description: Suggest an idea for Deckhouse
3+
labels:
4+
- 'type/enhancement'
5+
- 'status/needs-triage'
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thank you for submitting a feature request!
11+
12+
Please describe what you would like to change/add and why in detail by filling out the template below.
13+
- type: checkboxes
14+
attributes:
15+
label: Preflight Checklist
16+
description: Please ensure you've completed all of the following.
17+
options:
18+
- label: I agree to follow the [Code of Conduct](https://github.com/deckhouse/deckhouse/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
19+
required: true
20+
- label: I have searched the [issue tracker](https://github.com/deckhouse/deckhouse/issues) for an issue that matches the one I want to file, without success.
21+
required: true
22+
- type: textarea
23+
attributes:
24+
label: Use case. Why is this important?
25+
description: A clear and concise description of the problem you are seeking to solve with this feature request.
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: Proposed Solution
31+
description: A clear and concise description of what would you like to happen.
32+
validations:
33+
required: true
34+
- type: textarea
35+
attributes:
36+
label: Additional Information
37+
description: Add any other context about the problem here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Description
2+
<!---
3+
Describe your changes in detail.
4+
5+
Please let users know if your feature influences critical cluster components
6+
(restarts of ingress-controllers, control-plane, Prometheus, etc).
7+
-->
8+
9+
## Why do we need it, and what problem does it solve?
10+
<!---
11+
This is the most important paragraph.
12+
You must describe the main goal of your feature.
13+
14+
If it fixes an issue, place a link to the issue here.
15+
16+
If it fixes an obvious bug, please tell users about the impact and effect of the problem.
17+
-->
18+
19+
## What is the expected result?
20+
<!---
21+
How can one check these changes after applying?
22+
23+
Describe, what (resource, state, event, etc.) MUST or MUST NOT change/happen after applying these changes.
24+
-->
25+
26+
## Checklist
27+
- [ ] The code is covered by unit tests.
28+
- [ ] e2e tests passed.
29+
- [ ] Documentation updated according to the changes.
30+
- [ ] Changes were tested in the Kubernetes cluster manually.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
crane="/usr/local/bin/crane"
4+
repositoryName=$1
5+
edition=$2
6+
channel=$3
7+
version=$4
8+
user=$5
9+
password=$6
10+
11+
echo "Module $repositoryName, edition $edition, channel $channel, version $version"
12+
13+
if [[ "$channel" == "alpha" ]]; then
14+
echo "Deploying $version to alpha channel"
15+
exit 0
16+
elif [[ "$channel" == "beta" ]]; then
17+
previousChannel="alpha"
18+
elif [[ "$channel" == "early-access" ]]; then
19+
previousChannel="beta"
20+
elif [[ "$channel" == "stable" ]]; then
21+
previousChannel="early-access"
22+
elif [[ "$channel" == "rock-solid" ]]; then
23+
previousChannel="stable"
24+
else
25+
echo "Unknown channel"
26+
exit 1
27+
fi
28+
29+
echo "Checking previous channel $previousChannel"
30+
$crane auth login -u $user -p $password registry.deckhouse.io
31+
previousChannelVersion=$($crane export registry.deckhouse.io/deckhouse/$edition/modules/$repositoryName/release:$previousChannel | grep -aoE '\{"version":".*"\}' | jq -r .version)
32+
if [[ "$version" == "$previousChannelVersion" ]]; then
33+
echo "Previous channel $previousChannel version $previousChannelVersion is equal desired version $version, processing"
34+
exit 0
35+
else
36+
echo "Previous channel $previousChannel version $previousChannelVersion is not equal desired version $version, rejecting"
37+
exit 1
38+
fi

.github/workflows/build_dev.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build and push for dev
2+
3+
env:
4+
MODULES_REGISTRY: ${{ vars.DEV_REGISTRY }}
5+
CI_COMMIT_REF_NAME: ${{ github.ref_name }}
6+
MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }}
7+
MODULES_MODULE_SOURCE: ${{ vars.DEV_MODULE_SOURCE }}
8+
MODULES_REGISTRY_LOGIN: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
9+
MODULES_REGISTRY_PASSWORD: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
10+
GOLANG_VERSION: ${{ vars.GOLANG_VERSION }}
11+
GOPROXY: ${{ secrets.GOPROXY }}
12+
SOURCE_REPO: ${{ secrets.SOURCE_REPO }}
13+
BASE_IMAGES_VERSION: "v0.4.3"
14+
15+
on:
16+
#pull_request:
17+
# call from trivy_image_check.yaml, which in turn call from pull_request
18+
# https://stackoverflow.com/a/71489231
19+
workflow_call:
20+
push:
21+
branches:
22+
- main
23+
24+
jobs:
25+
lint:
26+
runs-on: [self-hosted, regular]
27+
continue-on-error: true
28+
name: Lint
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: deckhouse/modules-actions/lint@main
32+
env:
33+
DMT_METRICS_URL: ${{ secrets.DMT_METRICS_URL }}
34+
DMT_METRICS_TOKEN: ${{ secrets.DMT_METRICS_TOKEN }}
35+
36+
dev_setup_build:
37+
runs-on: [self-hosted, large]
38+
name: Build and Push images
39+
steps:
40+
- name: Set vars for PR
41+
if: ${{ github.ref_name != 'main' }}
42+
run: |
43+
MODULES_MODULE_TAG="$(echo pr${{ github.ref_name }} | sed 's/\/.*//g')"
44+
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
45+
shell: bash
46+
- name: Set vars for main
47+
if: ${{ github.ref_name == 'main' }}
48+
run: |
49+
echo "MODULES_MODULE_TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
50+
shell: bash
51+
- name: Print vars
52+
run: |
53+
echo MODULES_REGISTRY=$MODULES_REGISTRY
54+
echo CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME
55+
echo MODULES_MODULE_NAME=$MODULES_MODULE_NAME
56+
echo MODULES_MODULE_SOURCE=$MODULES_MODULE_SOURCE
57+
echo MODULES_MODULE_TAG=$MODULES_MODULE_TAG
58+
shell: bash
59+
60+
- uses: actions/checkout@v4
61+
62+
- name: Download base images
63+
run: |
64+
wget https://fox.flant.com/api/v4/projects/deckhouse%2Fbase-images/packages/generic/base_images/$BASE_IMAGES_VERSION/base_images.yml -O base_images.yml
65+
cat base_images.yml
66+
67+
- uses: deckhouse/modules-actions/setup@v2
68+
with:
69+
registry: ${{ vars.DEV_REGISTRY }}
70+
registry_login: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
71+
registry_password: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
72+
- uses: deckhouse/modules-actions/build@v2
73+
with:
74+
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
75+
module_name: ${{ vars.MODULE_NAME }}
76+
module_tag: ${{ env.MODULES_MODULE_TAG }}

0 commit comments

Comments
 (0)