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
51 changes: 51 additions & 0 deletions .github/workflows/release-helm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Helm chart

# Publishes the Helm chart to the GitHub Pages Helm repository when a release is
# published. The chart version and appVersion are set to the release tag, and the
# chart is uploaded via helm/chart-releaser-action (gh-pages branch + index.yaml).
on:
release:
types: [ released ]
workflow_dispatch:

permissions:
contents: write
pages: write

jobs:
release-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Set chart version to release tag
env:
# release runs strip a leading "v"; workflow_dispatch falls back to the chart's value
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
if [ -n "${RELEASE_TAG}" ]; then
VERSION="${RELEASE_TAG#v}"
chart="helm/kubernetes-glue-operator/Chart.yaml"
sed -i "s/^version:.*/version: ${VERSION}/" "$chart"
sed -i "s/^appVersion:.*/appVersion: \"${VERSION}\"/" "$chart"
echo "Chart set to version/appVersion ${VERSION}"
grep -E '^(version|appVersion):' "$chart"
fi

- name: Install Helm
uses: azure/setup-helm@v4

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
with:
charts_dir: helm
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ In other words, it also allows you to write **workflows** over resources in a **

The project is implemented as a thin layer on top of battle-tested [workflow](https://javaoperatorsdk.io/docs/workflows/) and [dependent resources](https://javaoperatorsdk.io/docs/dependent-resources/) features of Java Operator SDK, using [Quarkus based](https://github.com/quarkiverse/quarkus-operator-sdk) version of the framework.

## Installation

Install with Helm from the chart repository:

```bash
helm repo add glue-operator https://java-operator-sdk.github.io/kubernetes-glue-operator
helm repo update
helm install glue-operator glue-operator/kubernetes-glue-operator \
--namespace glue-operator --create-namespace
```

See the [chart README](/helm/kubernetes-glue-operator/README.md) for configuration options.

## Documentation

[Getting started](/docs/getting-started.md)
Expand Down
11 changes: 11 additions & 0 deletions helm/kubernetes-glue-operator/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Patterns to ignore when building packages.
*.tmpl
*.orig
*.bak
.DS_Store
.git/
.gitignore
.vscode/
.idea/
*.tgz
ci/
18 changes: 18 additions & 0 deletions helm/kubernetes-glue-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v2
name: kubernetes-glue-operator
description: A Helm chart for the Kubernetes Glue Operator
type: application
# version (chart) and appVersion (operator image) are overwritten at release time
# to match the released operator version.
version: 0.1.0
appVersion: "0.11.0"
home: https://github.com/java-operator-sdk/kubernetes-glue-operator
sources:
- https://github.com/java-operator-sdk/kubernetes-glue-operator
keywords:
- operator
- glue
- java-operator-sdk
maintainers:
- name: java-operator-sdk
url: https://github.com/java-operator-sdk
72 changes: 72 additions & 0 deletions helm/kubernetes-glue-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Kubernetes Glue Operator Helm chart

Installs the [Kubernetes Glue Operator](https://github.com/java-operator-sdk/kubernetes-glue-operator):
its `Glue` and `GlueOperator` CRDs, RBAC, and the operator `Deployment`.

## Install from the Helm repository

```bash
helm repo add glue-operator https://java-operator-sdk.github.io/kubernetes-glue-operator
helm repo update
helm install glue-operator glue-operator/kubernetes-glue-operator \
--namespace glue-operator --create-namespace
```

## Install from source

```bash
helm install glue-operator ./helm/kubernetes-glue-operator \
--namespace glue-operator --create-namespace
```

## CRDs

The `Glue` and `GlueOperator` CRDs live in the chart's `crds/` directory. Helm installs
them on first install but, by design, does **not** upgrade or delete them. On an upgrade
that changes the CRD schema, apply the new CRDs manually:

```bash
kubectl apply -f helm/kubernetes-glue-operator/crds/
```

## Configuration

| Key | Default | Description |
| --- | --- | --- |
| `replicaCount` | `1` | Operator replicas. |
| `image.repository` | `ghcr.io/java-operator-sdk/kubernetes-glue-operator` | Operator image. |
| `image.tag` | `""` | Image tag; defaults to the chart `appVersion`. |
| `image.pullPolicy` | `IfNotPresent` | Image pull policy. |
| `imagePullSecrets` | `[]` | Image pull secrets. |
| `watchNamespaces` | `[]` | Namespaces to watch; empty means all namespaces. |
| `serviceAccount.create` | `true` | Create a ServiceAccount. |
| `serviceAccount.name` | `""` | Override the ServiceAccount name. |
| `serviceAccount.annotations` | `{}` | ServiceAccount annotations. |
| `rbac.create` | `true` | Create ClusterRoles and bindings. |
| `rbac.allAccess` | `true` | Grant cluster-wide access to all resources. Disable for least privilege. |
| `rbac.extraRules` | `[]` | Extra rules added to the operator's ClusterRole (use with `allAccess: false`). |
| `rbac.bindView` | `true` | Bind the ServiceAccount to the built-in `view` ClusterRole. |
| `service.type` | `ClusterIP` | Service type. |
| `service.port` | `80` | Service port. |
| `resources` | `{}` | Container resource requests/limits. |
| `livenessProbe` / `readinessProbe` / `startupProbe` | Quarkus health endpoints | Probe config; set to `{}` to disable. |
| `extraEnv` | `[]` | Extra environment variables for the container. |
| `podAnnotations`, `podLabels`, `nodeSelector`, `tolerations`, `affinity`, `podSecurityContext`, `securityContext` | `{}` / `[]` | Standard pod/container scheduling and security knobs. |

### Why `rbac.allAccess`?

A `Glue` can manage **arbitrary** resource types, so the operator is granted cluster-wide
access by default. For a least-privilege setup, scope it to only the resource types your
`Glue`s manage:

```yaml
rbac:
allAccess: false
extraRules:
- apiGroups: [""]
resources: ["configmaps", "secrets", "services"]
verbs: ["*"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["*"]
```
121 changes: 121 additions & 0 deletions helm/kubernetes-glue-operator/crds/glueoperators.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Generated by Fabric8 CRDGenerator, manual edits might get overwritten!
apiVersion: "apiextensions.k8s.io/v1"
kind: "CustomResourceDefinition"
metadata:
name: "glueoperators.io.javaoperatorsdk.operator.glue"
spec:
group: "io.javaoperatorsdk.operator.glue"
names:
kind: "GlueOperator"
plural: "glueoperators"
shortNames:
- "go"
singular: "glueoperator"
scope: "Namespaced"
versions:
- name: "v1beta1"
schema:
openAPIV3Schema:
properties:
spec:
properties:
childResources:
items:
properties:
bulk:
type: "boolean"
clusterScoped:
type: "boolean"
condition:
type: "object"
x-kubernetes-preserve-unknown-fields: true
dependsOn:
items:
type: "string"
type: "array"
matcher:
enum:
- "NONE"
- "SSA"
type: "string"
name:
type: "string"
readyPostCondition:
type: "object"
x-kubernetes-preserve-unknown-fields: true
resource:
type: "object"
x-kubernetes-embedded-resource: true
x-kubernetes-preserve-unknown-fields: true
resourceTemplate:
type: "string"
required:
- "name"
type: "object"
type: "array"
glueMetadata:
properties:
name:
type: "string"
namespace:
type: "string"
type: "object"
parent:
properties:
apiVersion:
type: "string"
clusterScoped:
type: "boolean"
kind:
type: "string"
labelSelector:
type: "string"
status:
type: "object"
x-kubernetes-preserve-unknown-fields: true
statusTemplate:
type: "string"
type: "object"
relatedResources:
items:
properties:
apiVersion:
type: "string"
clusterScoped:
type: "boolean"
kind:
type: "string"
name:
type: "string"
namespace:
type: "string"
resourceNames:
items:
type: "string"
type: "array"
statusPatch:
type: "object"
x-kubernetes-preserve-unknown-fields: true
statusPatchTemplate:
type: "string"
required:
- "apiVersion"
- "kind"
- "name"
type: "object"
type: "array"
required:
- "parent"
type: "object"
status:
properties:
errorMessage:
type: "string"
observedGeneration:
type: "integer"
type: "object"
type: "object"
served: true
storage: true
subresources:
status: {}
96 changes: 96 additions & 0 deletions helm/kubernetes-glue-operator/crds/glues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Generated by Fabric8 CRDGenerator, manual edits might get overwritten!
apiVersion: "apiextensions.k8s.io/v1"
kind: "CustomResourceDefinition"
metadata:
name: "glues.io.javaoperatorsdk.operator.glue"
spec:
group: "io.javaoperatorsdk.operator.glue"
names:
kind: "Glue"
plural: "glues"
shortNames:
- "g"
singular: "glue"
scope: "Namespaced"
versions:
- name: "v1beta1"
schema:
openAPIV3Schema:
properties:
spec:
properties:
childResources:
items:
properties:
bulk:
type: "boolean"
clusterScoped:
type: "boolean"
condition:
type: "object"
x-kubernetes-preserve-unknown-fields: true
dependsOn:
items:
type: "string"
type: "array"
matcher:
enum:
- "NONE"
- "SSA"
type: "string"
name:
type: "string"
readyPostCondition:
type: "object"
x-kubernetes-preserve-unknown-fields: true
resource:
type: "object"
x-kubernetes-embedded-resource: true
x-kubernetes-preserve-unknown-fields: true
resourceTemplate:
type: "string"
required:
- "name"
type: "object"
type: "array"
relatedResources:
items:
properties:
apiVersion:
type: "string"
clusterScoped:
type: "boolean"
kind:
type: "string"
name:
type: "string"
namespace:
type: "string"
resourceNames:
items:
type: "string"
type: "array"
statusPatch:
type: "object"
x-kubernetes-preserve-unknown-fields: true
statusPatchTemplate:
type: "string"
required:
- "apiVersion"
- "kind"
- "name"
type: "object"
type: "array"
type: "object"
status:
properties:
errorMessage:
type: "string"
observedGeneration:
type: "integer"
type: "object"
type: "object"
served: true
storage: true
subresources:
status: {}
Loading
Loading