Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
---
version: 2
updates:
- package-ecosystem: "github-actions"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/daily_security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
---
name: Security audit

on:
schedule:
- cron: '0 0 * * *'
- cron: '15 4 * * *'
workflow_dispatch:

jobs:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/helm_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Lint and Test Helm Charts

on:
push:
branches: ["main"]
pull_request:

env:
CT_CONFIG: deploy/helm/ct.yaml

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2

- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Compile chart
run: make compile-chart

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.0

- name: Run chart-testing (lint)
run: ct lint --config "${CT_CONFIG}"

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config "${CT_CONFIG}")
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi

- name: Create kind cluster
uses: helm/kind-action@v1.2.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --config "${CT_CONFIG}"
if: steps.list-changed.outputs.changed == 'true'
14 changes: 7 additions & 7 deletions .github/workflows/publish_main_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
name: Publish nightly artifacts from main
---
name: Publish nightly artifacts from main branch

on:
push:
Expand All @@ -11,15 +12,14 @@ on:
schedule:
- cron: '30 4 * * *'
workflow_dispatch:


env:
PRODUCT_NAME: hdfs
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: '0'
RUSTFLAGS: "-D warnings -W rust-2021-compatibility"
REPO_HELM_DEV_URL: https://repo.stackable.tech/repository/helm-dev
RUSTFLAGS: "-D warnings"
REPO_HELM_URL: https://repo.stackable.tech/repository/helm-dev
CHART_TESTING_CONFIG: deploy/helm/chart-testing.yaml

jobs:
Expand Down Expand Up @@ -47,6 +47,7 @@ jobs:

- name: Package Chart
run: mkdir -p target/helm && helm package --destination target/helm deploy/helm/${{ env.PRODUCT_NAME }}-operator

- name: Publish Chart
env:
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
Expand All @@ -55,6 +56,5 @@ jobs:
/usr/bin/curl
--fail
-u 'github:${{ secrets.NEXUS_PASSWORD }}'
--upload-file "./$(find target/helm/ -name *.tgz)"
"${{ env.REPO_HELM_DEV_URL }}/"

--upload-file "./$(find target/helm/ -name '*.tgz')"
"${{ env.REPO_HELM_URL }}/"
15 changes: 8 additions & 7 deletions .github/workflows/publish_pr_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
name: Publish pull-requests artifacts to the dev repository
---
name: Publish pull-request artifacts

on:
pull_request:
Expand All @@ -12,8 +13,8 @@ env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: '0'
RUSTFLAGS: "-D warnings -W rust-2021-compatibility"
REPO_HELM_DEV_URL: https://repo.stackable.tech/repository/helm-dev
RUSTFLAGS: "-D warnings"
REPO_HELM_URL: https://repo.stackable.tech/repository/helm-test
CHART_TESTING_CONFIG: deploy/helm/chart-testing.yaml

jobs:
Expand All @@ -36,7 +37,7 @@ jobs:
python-version: '3.x'

- run: pip install -r ./python/requirements.txt
- run: python ./python/cargo-version.py -m mr${{ github.event.number }}
- run: python ./python/cargo_version.py -m pr${{ github.event.number }}

- name: Build Docker image
env:
Expand All @@ -49,6 +50,7 @@ jobs:

- name: Package Chart
run: mkdir -p target/helm && helm package --destination target/helm deploy/helm/${{ env.PRODUCT_NAME }}-operator

- name: Publish Chart
env:
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
Expand All @@ -57,6 +59,5 @@ jobs:
/usr/bin/curl
--fail
-u 'github:${{ secrets.NEXUS_PASSWORD }}'
--upload-file "./$(find target/helm/ -name *.tgz)"
"${{ env.REPO_HELM_DEV_URL }}/"

--upload-file "./$(find target/helm/ -name '*.tgz')"
"${{ env.REPO_HELM_URL }}/"
13 changes: 7 additions & 6 deletions .github/workflows/publish_release_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
name: Publish-Release-Artifacts
---
name: Publish release artifacts

on:
push:
Expand All @@ -14,9 +15,9 @@ env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: '0'
RUSTFLAGS: "-D warnings -W rust-2021-compatibility"
REPO_HELM_STABLE_URL: https://repo.stackable.tech/repository/helm-stable
CT_CONFIG: deploy/helm/ct.yaml
RUSTFLAGS: "-D warnings"
REPO_HELM_URL: https://repo.stackable.tech/repository/helm-stable
CHART_TESTING_CONFIG: deploy/helm/chart-testing.yaml

jobs:
helm:
Expand Down Expand Up @@ -52,5 +53,5 @@ jobs:
/usr/bin/curl
--fail
-u 'github:${{ secrets.NEXUS_PASSWORD }}'
--upload-file "./$(find target/helm/ -name *.tgz)"
"${{ env.REPO_HELM_STABLE_URL }}/"
--upload-file "./$(find target/helm/ -name '*.tgz')"
"${{ env.REPO_HELM_URL }}/"
13 changes: 8 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
name: Rust
---
name: Rust checks

on:
push:
Expand All @@ -17,6 +18,8 @@ env:
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: '0'
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"
RUST_LOG: "info"

jobs:

Expand Down Expand Up @@ -79,10 +82,10 @@ jobs:
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
components: clippy
override: true
profile: minimal
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v1.3.0
with:
key: clippy
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ target/
*.iml

*.tgz
deploy/helm/hdfs-operator/configs
deploy/helm/hdfs-operator/templates/crds.yaml
9 changes: 9 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[MESSAGES CONTROL]

# These rules are for missing docstrings which doesn't matter much for most of our simple scripts
disable=C0114,C0115,C0116

[FORMAT]

max-line-length=999
indent-string=' '
10 changes: 10 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default

ignore: |
deploy/helm/**/templates

rules:
line-length: disable
truthy:
check-keys: false
3 changes: 2 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ status = [
'Run cargo deny (bans licenses sources)'
]
delete_merged_branches = true
use_squash_merge = true
pr_status = [ 'license/cla' ]
timeout_sec = 7200
cut_body_after = "<!-- Commit message above. Everything below is not added to the message. Do not change this line! -->"
cut_body_after = "<!-- Commit message above. Everything below is not added to the message. Do not change this line! -->"
4 changes: 4 additions & 0 deletions deploy/DO_NOT_EDIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
These Helm charts and manifests are automatically generated.
Please do not edit anything in this directory manually.

The details are in-motion but check this repository for a few details: https://github.com/stackabletech/operator-templating
5 changes: 0 additions & 5 deletions deploy/helm/chart_testing.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions deploy/helm/ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file is used for chart-testing (https://github.com/helm/chart-testing)
# The name "ct.yaml" is not very self-descriptive but it is the default that chart-testing is looking for
---
remote: origin
target-branch: main
chart-dirs:
- deploy/helm
all: true
31 changes: 6 additions & 25 deletions deploy/helm/hdfs-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
# =============
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
---
apiVersion: v2
name: hdfs-operator
description: The Stackable Operator for Apache HDFS
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
maintainers:
- name: stackable
url: github.com/stackabletech
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0-nightly
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.3.0-nightly
appVersion: "0.3.0-nightly"
home: https://github.com/stackabletech/hdfs-operator
maintainers:
- name: Stackable
url: https://www.stackable.tech
17 changes: 4 additions & 13 deletions deploy/helm/hdfs-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[//]: # (=============)
[//]: # (This file is automatically generated from the templates in stackabletech/operator-templating)
[//]: # (DON'T MANUALLY EDIT THIS FILE)
[//]: # (=============)

# Helm Chart for Stackable Operator for Apache HDFS

This Helm Chart can be used to install Custom Resource Definitions and the Operator for Apache HDFS provided by Stackable.
Expand All @@ -14,7 +9,7 @@ This Helm Chart can be used to install Custom Resource Definitions and the Opera
- Install [Helm](https://helm.sh/docs/intro/install/)


## Install the Stackble Operator for Apache HDFS
## Install the Stackable Operator for Apache HDFS

```bash
# From the root of the operator repository
Expand All @@ -24,15 +19,11 @@ helm install hdfs-operator deploy/helm/hdfs-operator
```


## Usage of the CRDs

The usage of this operator and its CRDs is described in the [documentation](https://docs.stackable.tech/hdfs/index.html)

## Create a Apache HDFS Cluster

as described [here](https://docs.stackable.tech/hdfs/index.html)



The operator has example requests included in the [`/examples`](https://github.com/stackabletech/hdfs/operator/tree/main/examples) directory that can be used to spin up a cluster.
The operator has example requests included in the [`/examples`](https://github.com/stackabletech/hdfs/operator/tree/main/examples) directory.


## Links
Expand Down
5 changes: 1 addition & 4 deletions deploy/helm/hdfs-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# =============
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
---
apiVersion: v1
data:
{{ (.Files.Glob "configs/*").AsConfig | indent 2 }}
Expand Down
5 changes: 1 addition & 4 deletions deploy/helm/hdfs-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# =============
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
3 changes: 2 additions & 1 deletion deploy/helm/hdfs-operator/templates/roles.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -29,7 +30,7 @@ rules:
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebinding
- rolebindings
verbs:
- create
- delete
Expand Down
Loading