Skip to content
Draft
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
12 changes: 12 additions & 0 deletions apache-druid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Apache Druid Operator Feature Matrix (Apache Druid OFM)


This directory contains the OFM for Apache Druid Kubernetes operators.
Please refer to the [main project's README.md](../README.md) for more information about the the OFM (Operator Feature Matrix) project.


The contents of this directory are structured as follows:

* [spec](spec). Contains the specification of the Apache Druid OFM.
* [vendor-submissions](vendor-submissions). Contains the submission files that every vendor has contributed for each of the releases that they submitted a compliance OFM. Includes documentation for vendors on how to submit their compliance OFMs.

24 changes: 24 additions & 0 deletions apache-druid/spec/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Apache Druid OFM Specification


The contents of this directory are structured as follows:

* [feature_matrix.yaml](feature_matrix.yaml). The feature matrix itself. It is a YAML file that serves as the source of truth for the Apache Druid OFM features. It is encoded in a machine parsable format to allow other files to be derived from it, as well as to allow automatic processing of the features.
* [feature_matrix.md](feature_matrix.md). This file acts as a "view" to the matrix, providing a convenient way to represent it visually. This file should not be edited directly, as it is generated automatically from the [feature_matrix.yaml](feature_matrix.yaml) file. This render is intented to aid in reading and understanding the specification itself, but it is not expected to be consumed directly by end users. Instead, end users are expected to view the submissions made by vendors or, better, the Markdown or web renderings of such submissions.
* [yaml2md](yaml2md). Directory that contains the script to render the Markdown feature matrix from the YAML feature matrix.


## Description of the Apache Druid feature matrix

The OFM is contained in the [feature_matrix.yaml](feature_matrix.yaml) file. The most relevant fields of the document are:
* `.metadata`. Contains information about the OFM Specification, including its version and version release date.
* `.categories`. Features are classified first into categories. It is an array of features. Each category has an `.id` and a `.name`. The `.id` is an immutable and unique four characters identifier, and the `.name` is a mutable and user-friendly definition of the category.
* `.categories[].features`. An array that contains all the features for every category.
* `.categories[].features[]`. Each feature. Similarly to categories, they contain an `.id` (in this case five characters) and a `.name`. They also contain other relevant fields:
* `type`. It is the data type of the value that vendors will provide on the submission for this particular feature. For most of the features this field will be `boolean`, which is the easiest way for end users to visually read a comprehensive feature matrix with many features. Some other features require more details, and may have `enum`, `string` or even `string_array` types for this field.
* `description`. It is the end user facing description of the feature. May include Markdown syntax to enhance readability.
* `vendor_compliance`. It is a field for vendors that provides clarification on how the feature is expected to be implemented in order to achieve compliance with the feature. It also accepts Markdown formatting.
* `main`. It is a cross-categories field to identify features that are considered more important or "core" to the whole OFM. They may be rendered independently of the others to signify their relevance.



807 changes: 807 additions & 0 deletions apache-druid/spec/feature_matrix.bck.yaml

Large diffs are not rendered by default.

166 changes: 166 additions & 0 deletions apache-druid/spec/feature_matrix.md

Large diffs are not rendered by default.

704 changes: 704 additions & 0 deletions apache-druid/spec/feature_matrix.yaml

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions apache-druid/spec/yaml2md/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# README

In order to export the markdown file containing the table version of the origin YAML, you must have [gomplate](https://github.com/hairyhenderson/gomplate) installed.


## Installing gomplate

Information on how to install the required command line tool can be found here: [https://docs.gomplate.ca/installing/](https://docs.gomplate.ca/installing/)

## Convert yaml to markdown table

```
sh yaml2md.sh
```

## Notes

- Make sure that the file `feature_matrix.yaml` is stored on the parent folder before running the script.
- The html file `feature_matrix.md` will be created on the parent folder.
11 changes: 11 additions & 0 deletions apache-druid/spec/yaml2md/yaml2md.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

> ../feature_matrix.md

if ! command -v gomplate &> /dev/null
then
echo "The required tool \"gomplate\" could not be found. Please make sure to install it and try again."
exit
fi

gomplate -d fm='../feature_matrix.yaml' -o '../feature_matrix.md' -f 'yaml2md.tmpl'
7 changes: 7 additions & 0 deletions apache-druid/spec/yaml2md/yaml2md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ range (ds "fm").categories }}
## {{ .name }} – [{{ .id }}](#{{ .id }})
| **ID** | **NAME** | **TYPE** | **DESCRIPTION** | **VENDOR COMPLIANCE** | **MAIN CATEGORY** |
|---|---|---|---|---|---|
{{ range .features }}| {{ .id }} | {{ .name }} | {{ .type }} | {{ if (has . "description") }}{{ .description | strings.Trim "\n" | strings.ReplaceAll "\n" "<br />" }}{{ end }} | {{ if (has . "vendor_compliance") }}{{ .vendor_compliance | strings.ReplaceAll "\n" "<br />" }}{{ end }} | {{ if (has . "main") }} ✓ {{ end }} |
{{ end }}
{{ end }}
23 changes: 23 additions & 0 deletions apache-druid/vendor-submissions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Apache Druid OFM Vendor Submission

This directory contains:

* [vendor-submission-template.yaml](vendor-submission-template.yaml). This is the file that should be copied as a template to fill in the details of each vendor's submission. Note that this file should not be edited directly, as it is derived from the source [feature matrix](../spec/feature_matrix.yaml).
* [vendor-submission-template-generator](vendor-submission-template-generator). Script and helper file to generate the `vendor-submission-template.yaml` from the source feature matrix.


## Vendor Submission Guidelines

To produce a vendor submission, please observe the following rules:
* Submissions are tied to a particular release of the vendor's operator. Vendors are expected to produce a new submission for every major release of their operator. If no significant change across operator releases is produced in terms of the features supported, submission may be skipped. The rendering of the vendor's OFM for end users will do a best effort to always show the "latest" version (if semantic versioning or similar versioning style is use) of a given vendor's submissions. It is however preferrable to always submit a version with each operator's release. It is suggested for vendors to treat the YAML file for the submission as another artifact of their release and add it to their standard release procedure.
* Create a pull request against this repository with the submission. The filename for the submission must comply with the following naming format: `Apache Druid/vendor-submissions/${vendor_name_lowercase}/${vendor_name_lowercase}-${ofm_version}-${operator_release_version}.yaml`, and be based on the `vendor-submission-template.yaml` of the given OFM version.
* Observe the indications in the `.vendor_compliance` field of the OFM to determine whether the operator's release is compliant (implements) or not a given feature.
* No bullshit, no marketing. Make objective assessments, and don't include marketing or subjective observations as part of the submission.

The relevant fields of the submission template are:
* Comments. They are provided as indications for the vendor. They must be left as part of the submission, without removing the comment character.
* `.value`. It is the main value to provide for the feature, and it must be valid according to the `.type` field. Required.
* `.references`. A string array. Ideally, a single string, provide more than one only if strictly necessary. Each reference must be a Markdown-formatted URL. The text part of the URL should be a short or very short text and the location the address of a webpage or section of a webpage that shows or demonstrates the implementation of the given feature. To keep the text short (for readability purposes) either a short version of the title of the documentation's section may be used, or simple words like `Documentation` or `Doc`. This field is not required, but of high value to end users if provided.
* `.comments`. An optional free-form text field for the vendor to provide more detail information about the compliance/non compliance and possible justifications. Please observe the no bullshit and no marketing rules. Comments should be as concise and objective as possible. Markdown formatting may be used.
* Unimplemented features can be left empty; be removed from the submission; or be left unimplemented (setting the `.value` field to `false` for boolean values or empty for every other type) and providing further information in the `.comments` field about why it is not (or partially) implemented. Empty (null) value is therefore treated as "unimplemented".

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

> vendor-submission-template.yaml

if ! command -v gomplate &> /dev/null
then
echo "The required tool \"gomplate\" could not be found. Please make sure to install it and try again."
exit
fi

gomplate -d fm='../../spec/feature_matrix.yaml' -o '../vendor-submission-template.yaml' -f 'vendor-submission-template-generator.tmpl'
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
metadata:
featureMatrixSpecVersion:
submission:
version:
datePublished:
releaseNotes:
operator:
name:
url:
featureMatrix:
categories:{{ range (ds "fm").categories }}
- id: {{ .id }}
# name: {{ .name }}{{ range .features }}
- id: {{ .id }}
# name: {{ .name }}
# type: {{ .type }}
# description: |
# {{ .description | strings.ReplaceAll "\n" "" }}{{ if (has . "vendor_compliance") }}{{ "\n " }}# vendor_compliance: |{{ "\n " }}# {{ .vendor_compliance | strings.TrimSuffix "\n" | strings.ReplaceAll "\n" "\n # " }}{{ end }}
value:
references:
comments:{{ end }}
{{ end }}
Loading