Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KPOps 3.0 #420

Merged
merged 38 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
025db73
Move GitHub action to repository root (#356)
disrupted Sep 13, 2023
fed04f6
Merge branch 'main' of github.com:bakdata/kpops into v3
raminqaf Sep 27, 2023
b800dcc
Make Kafka REST Proxy & Kafka Connect hosts default and improve Schem…
raminqaf Oct 5, 2023
0a57aec
Merge remote-tracking branch 'origin/main' into v3
disrupted Oct 12, 2023
a04c98f
Create HelmApp component (#370)
disrupted Oct 24, 2023
c1bf854
Fix early exit upon Helm exit code 1 (#376)
sujuka99 Oct 23, 2023
2b6710b
Migrate deprecated mkdocs-material-extensions (#378)
disrupted Oct 23, 2023
ec55524
Fix docs setup page list indentation (#377)
sujuka99 Oct 24, 2023
dfb2881
Exclude resources from docs search (#371)
disrupted Oct 24, 2023
bbaf5bd
Bump version 2.0.10 → 2.0.11
bakdata-bot Oct 24, 2023
1b0e89a
Merge remote-tracking branch 'origin/main' into v3
disrupted Oct 25, 2023
52d9b13
Fix test
disrupted Oct 25, 2023
919c0d4
Add missing HelmApp docs
disrupted Oct 31, 2023
25ba5a6
Merge branch 'main' of github.com:bakdata/kpops into v3
raminqaf Dec 8, 2023
74ffd6e
Migrate to Pydantic v2 (#347)
sujuka99 Dec 12, 2023
03aa318
Allow overriding config files (#391)
sujuka99 Dec 12, 2023
dac1cc9
Change substitution variables separator to `.` (#388)
sujuka99 Dec 12, 2023
f95afe2
Refactor pipeline generator & representation (#392)
disrupted Dec 20, 2023
e770163
Define custom components module & pipeline base dir globally (#387)
disrupted Dec 21, 2023
96c9d2d
Update KPOps runner with the new options (#395)
raminqaf Dec 21, 2023
96c196f
Add steps for KubernetesApp->HelmApp to migration guide
disrupted Dec 21, 2023
3cd1095
Fix KPOps action to get package from testPyPI (#396)
raminqaf Dec 22, 2023
4a41594
Use hash and trim long Helm release names instead of only trimming (#…
raminqaf Jan 2, 2024
c256a03
Refactor Helm `nameOverride` (#397)
disrupted Jan 2, 2024
a6385db
Mark component type as computed Pydantic field (#399)
disrupted Jan 8, 2024
2301aaf
Fix missing component type in pipeline schema (#401)
disrupted Jan 8, 2024
d0f0906
Refactor generate template for Python API usage (#380)
disrupted Jan 8, 2024
1547eca
Generate defaults schema (#402)
disrupted Jan 8, 2024
3a86e04
Update docs for substitution variable usage in v3 (#409)
sujuka99 Jan 11, 2024
8f5af65
Namespace substitution vars (#408)
sujuka99 Jan 11, 2024
6bd6e7c
Support multiple inheritance for doc generation (#406)
sujuka99 Jan 11, 2024
bd9e135
Refactor streams-bootstrap cleanup jobs as individual HelmApp (#398)
disrupted Jan 15, 2024
0c2feaa
Update docs for v3 (#416)
sujuka99 Jan 16, 2024
4b40e66
Refactor Kafka Connector resetter as individual HelmApp (#400)
disrupted Jan 16, 2024
61bceca
Update tests resources (#417)
sujuka99 Jan 16, 2024
10adb81
Fix enrichment of nested Pydantic BaseModel (#415)
disrupted Jan 16, 2024
15c4667
Summarize all breaking changes in diffs at the top of the migration g…
sujuka99 Jan 17, 2024
a90984b
Fix wrong Helm release name character limit (#418)
disrupted Jan 17, 2024
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
9 changes: 4 additions & 5 deletions .github/actions/update-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ inputs:
required: true
version:
description: "Version name to be deployed by mike"
required: true
required: true
release:
description: "Determines if the set version is a stable and latest version, otherwise it is a dev version. (Default false)"
default: 'false'
default: "false"
required: false

runs:
Expand All @@ -35,14 +35,13 @@ runs:
run: |
poetry install --with docs

- name: Update ${{ github.head_ref }} branch
- name: Update gh-pages branch
shell: bash
run: |
git config --local user.name ${{ inputs.username }}
git config --local user.email ${{ inputs.email }}
git config --local user.password ${{ inputs.token }}

git pull
git fetch origin gh-pages

- name: Deploy ${{ inputs.version }} version of the documentation with mike
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ You can install it with [pip](https://github.com/pypa/pip):
pip install kpops
```

# GitHub action

Please refer to the [GitHub Actions section](https://bakdata.github.io/kpops/latest/user/references/ci-integration/github-actions) for the documentation.

## Contributing

We are happy if you want to contribute to this project.
Expand Down
18 changes: 10 additions & 8 deletions actions/kpops-runner/action.yaml → action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ inputs:
working-directory:
description: "The root directory containing the config.yaml, pipelines folder and defaults"
default: "."
pipeline-base-dir:
description: "Directory where relative pipeline variables are initialized from"
required: false
defaults:
description: "Defaults folder path"
required: false
config:
description: "config.yaml file path"
description: "Directory containing the config*.yaml file(s)"
required: false
components:
description: "Components package path"
environment:
description: "Environment to run KPOps in"
required: false
filter-type:
description: "Whether to include/exclude the steps defined in KPOPS_PIPELINE_STEPS (default is include)"
Expand Down Expand Up @@ -73,10 +70,15 @@ runs:
shell: bash
run: |
echo "::group::install kpops package"
pip install -r "${{ steps.requirements.outputs.path }}"
# Check if kpops-version contains ".dev"
if [[ "${{ inputs.kpops-version }}" == *".dev"* ]]; then
pip install -r "${{ steps.requirements.outputs.path }}" -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/
else
pip install -r "${{ steps.requirements.outputs.path }}"
fi
echo "::endgroup::"

- name: ${{ inputs.command }} ${{ inputs.pipeline }} pipeline
shell: bash
working-directory: ${{inputs.working-directory}}
run: kpops ${{ inputs.command }} ${{ inputs.pipeline }} ${{ inputs.components }} ${{ (inputs.defaults != '' && format('--defaults {0}', inputs.defaults)) || '' }} ${{ (inputs.config != '' && format('--config {0}', inputs.config)) || '' }} ${{ (inputs.pipeline-base-dir != '' && format('--pipeline-base-dir {0}', inputs.pipeline-base-dir)) || '' }} ${{ (inputs.filter-type != '' && format('--filter-type {0}', inputs.filter-type)) || '' }}
run: kpops ${{ inputs.command }} ${{ inputs.pipeline }} ${{ (inputs.defaults != '' && format('--defaults {0}', inputs.defaults)) || '' }} ${{ (inputs.config != '' && format('--config {0}', inputs.config)) || '' }} ${{ (inputs.environment != '' && format('--environment {0}', inputs.environment)) || '' }} ${{ (inputs.filter-type != '' && format('--filter-type {0}', inputs.filter-type)) || '' }}
3 changes: 0 additions & 3 deletions actions/kpops-runner/README.md

This file was deleted.

8 changes: 3 additions & 5 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
environment: development
brokers: "http://k8kafka-cp-kafka-headless.kpops.svc.cluster.local:9092"
kafka_connect_host: "http://localhost:8083"
kafka_rest_host: "http://localhost:8082"
schema_registry_url: "http://localhost:8081"
kafka_brokers: "http://k8kafka-cp-kafka-headless.kpops.svc.cluster.local:9092"
components_module: tests.pipeline.test_components
pipeline_base_dir: tests/pipeline
2 changes: 1 addition & 1 deletion docs/docs/developer/auto-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Auto generation happens mostly with [`pre-commit`](https://pre-commit.com/) hook

- `cli_env_vars.env` -- All CLI environment variables in a `dotenv` file.
- `cli_env_vars.md` -- All CLI environment variables in a table.
- `config_env_vars.env` -- Almost all pipeline config environment variables in a `dotenv` file. The script checks for each field in [`PipelineConfig`](https://github.com/bakdata/kpops/blob/main/kpops/cli/pipeline_config.py) whether it has an `env` attribute defined. The script is currently unable to visit the classes of fields like `topic_name_config`, hence any environment variables defined there would remain unknown to it.
- `config_env_vars.env` -- Almost all pipeline config environment variables in a `dotenv` file. The script checks for each field in [`KpopsConfig`](https://github.com/bakdata/kpops/blob/main/kpops/cli/kpops_config.py) whether it has an `env` attribute defined. The script is currently unable to visit the classes of fields like `topic_name_config`, hence any environment variables defined there would remain unknown to it.
- `config_env_vars.env` -- Almost all pipeline config environment variables in a table.
- `variable_substitution.yaml` -- A copy of `./tests/pipeline/resources/component-type-substitution/pipeline.yaml` used as an example of substitution.

Expand Down
26 changes: 16 additions & 10 deletions docs/docs/resources/architecture/components-hierarchy.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
```mermaid
flowchart BT
KubernetesApp --> PipelineComponent
KafkaConnector --> PipelineComponent
KafkaApp --> KubernetesApp
KafkaApp --> PipelineComponent
HelmApp --> KubernetesApp
StreamsBootstrap --> HelmApp
StreamsApp --> KafkaApp
StreamsApp --> StreamsBootstrap
ProducerApp --> KafkaApp
ProducerApp --> StreamsBootstrap
KafkaConnector --> PipelineComponent
KafkaSourceConnector --> KafkaConnector
KafkaSinkConnector --> KafkaConnector

click KubernetesApp "../kubernetes-app"
click KafkaApp "../kafka-app"
click StreamsApp "../streams-app"
click ProducerApp "../producer-app"
click KafkaConnector "../kafka-connector"
click KafkaSourceConnector "../kafka-source-connector"
click KafkaSinkConnector "../kafka-sink-connector"

click KubernetesApp "/kpops/user/core-concepts/components/kubernetes-app"
click HelmApp "/kpops/user/core-concepts/components/helm-app"
click KafkaApp "/kpops/user/core-concepts/components/kafka-app"
click StreamsBootstrap "/kpops/user/core-concepts/components/streams-bootstrap"
click StreamsApp "/kpops/user/core-concepts/components/streams-app"
click ProducerApp "/kpops/user/core-concepts/components/producer-app"
click KafkaConnector "/kpops/user/core-concepts/components/kafka-connector"
click KafkaSourceConnector "/kpops/user/core-concepts/components/kafka-source-connector"
click KafkaSinkConnector "/kpops/user/core-concepts/components/kafka-sink-connector"
```

<p style="text-align: center;"><i>KPOps component hierarchy</i></p>
14 changes: 12 additions & 2 deletions docs/docs/resources/editor_integration/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"yaml.schemas": {
"https://bakdata.github.io/kpops/2.0/schema/config.json": "config.yaml",
"https://bakdata.github.io/kpops/2.0/schema/pipeline.json": "pipeline.yaml"
"https://bakdata.github.io/kpops/3.0/schema/pipeline.json": [
"pipeline.yaml",
"pipeline_*.yaml"
],
"https://bakdata.github.io/kpops/3.0/schema/defaults.json": [
"defaults.yaml",
"defaults_*.yaml"
],
"https://bakdata.github.io/kpops/3.0/schema/config.json": [
"config.yaml",
"config_*.yaml"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
helm-app.yaml:
- app-helm-app.yaml
- repo_config-helm-app.yaml
kafka-app.yaml:
- prefix.yaml
- from_.yaml
- to.yaml
- app-kafka-app.yaml
- version-kafka-app.yaml
kafka-connector.yaml:
- prefix.yaml
- from_.yaml
- to.yaml
- namespace.yaml
- app-kafka-connector.yaml
- repo_config-kafka-connector.yaml
- version-kafka-connector.yaml
- resetter_values.yaml
kafka-sink-connector.yaml: []
kafka-source-connector.yaml:
Expand All @@ -20,8 +22,6 @@ kubernetes-app.yaml:
- to.yaml
- namespace.yaml
- app-kubernetes-app.yaml
- repo_config-kubernetes-app.yaml
- version.yaml
producer-app.yaml:
- from_-producer-app.yaml
- app-producer-app.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kpops_components_fields:
kafka-app:
helm-app:
- name
- prefix
- from_
Expand All @@ -8,35 +8,35 @@ kpops_components_fields:
- app
- repo_config
- version
kafka-app:
- name
- prefix
- from_
- to
- app
kafka-connector:
- name
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
- resetter_namespace
- resetter_values
kafka-sink-connector:
- name
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
- resetter_namespace
- resetter_values
kafka-source-connector:
- name
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
- resetter_namespace
- resetter_values
- offset_topic
kubernetes-app:
Expand All @@ -46,8 +46,6 @@ kpops_components_fields:
- to
- namespace
- app
- repo_config
- version
pipeline-component:
- name
- prefix
Expand All @@ -71,12 +69,76 @@ kpops_components_fields:
- app
- repo_config
- version
streams-bootstrap:
- name
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
kpops_components_inheritance_ref:
kafka-app: kubernetes-app
kafka-connector: pipeline-component
kafka-sink-connector: kafka-connector
kafka-source-connector: kafka-connector
kubernetes-app: pipeline-component
pipeline-component: base-defaults-component
producer-app: kafka-app
streams-app: kafka-app
helm-app:
bases:
- kubernetes-app
parents:
- kubernetes-app
- pipeline-component
kafka-app:
bases:
- pipeline-component
parents:
- pipeline-component
kafka-connector:
bases:
- pipeline-component
parents:
- pipeline-component
kafka-sink-connector:
bases:
- kafka-connector
parents:
- kafka-connector
- pipeline-component
kafka-source-connector:
bases:
- kafka-connector
parents:
- kafka-connector
- pipeline-component
kubernetes-app:
bases:
- pipeline-component
parents:
- pipeline-component
pipeline-component:
bases: []
parents: []
producer-app:
bases:
- kafka-app
- streams-bootstrap
parents:
- kafka-app
- streams-bootstrap
- helm-app
- kubernetes-app
- pipeline-component
streams-app:
bases:
- kafka-app
- streams-bootstrap
parents:
- kafka-app
- streams-bootstrap
- helm-app
- kubernetes-app
- pipeline-component
streams-bootstrap:
bases:
- helm-app
parents:
- helm-app
- kubernetes-app
- pipeline-component
Loading
Loading