Skip to content
Merged
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
28 changes: 21 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name: Release

# Builds and publishes the operator container image and the Helm chart to
# GitHub Container Registry (GHCR / GitHub Packages).
# GitHub Container Registry (GHCR / GitHub Packages), and creates the matching
# GitHub Release.
#
# * workflow_dispatch -> manual snapshot, same as a push to main.
# * push tag v* -> tagged release: image + chart + GitHub Release.
# * workflow_dispatch -> manual build/publish of image + chart (no GitHub Release).

on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
version:
description: "Version to release"
description: "Version to release (without the leading v)"
required: true
default: "0.0.0"
default: "0.1.2"

concurrency:
group: release-${{ github.ref }}
Expand Down Expand Up @@ -40,8 +44,16 @@ jobs:
id: compute
run: |
set -eu
echo "chart_version=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
echo "image_tag=v${{ inputs.version }}" >> "$GITHUB_OUTPUT"
if [ "${{ github.ref_type }}" = "tag" ]; then
TAG="${{ github.ref_name }}" # e.g. v0.1.2
CHART_VERSION="${TAG#v}" # 0.1.2 (chart/app versions are semver, no leading v)
IMAGE_TAG="$TAG" # v0.1.2
else
CHART_VERSION="${{ inputs.version }}"
IMAGE_TAG="v${{ inputs.version }}"
fi
echo "chart_version=$CHART_VERSION" >> "$GITHUB_OUTPUT"
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
echo "is_release=true" >> "$GITHUB_OUTPUT"

image:
Expand Down Expand Up @@ -128,7 +140,7 @@ jobs:
release:
name: GitHub Release
needs: [versions, chart]
if: needs.versions.outputs.is_release == 'true'
if: github.ref_type == 'tag'
runs-on: hyperbytedb-operator-controller
steps:
- uses: actions/download-artifact@v4
Expand All @@ -138,6 +150,8 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
files: hyperbytedb-operator-*.tgz
body: |
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ helm install hyperbytedb-operator \
```sh
helm install hyperbytedb-operator \
oci://ghcr.io/hyperbyte-cloud/charts/hyperbytedb-operator \
--version 0.1.0 \
--version 0.1.2 \
--namespace hyperbytedb-operator-system \
--create-namespace
```
Expand Down Expand Up @@ -92,9 +92,9 @@ explicitly:

```sh
kubectl delete crd \
hyperbytedbclusters.hyperbytedb.hyperbytedb.io \
hyperbytedbbackups.hyperbytedb.hyperbytedb.io \
hyperbytedbrestores.hyperbytedb.hyperbytedb.io
hyperbytedbclusters.hyperbytedb.hyperbyte.cloud \
hyperbytedbbackups.hyperbytedb.hyperbyte.cloud \
hyperbytedbrestores.hyperbytedb.hyperbyte.cloud
```

### Install from source (development)
Expand All @@ -113,7 +113,7 @@ helm install hyperbytedb-operator dist/chart \
## Deploy a Cluster

```yaml
apiVersion: hyperbytedb.hyperbytedb.io/v1alpha1
apiVersion: hyperbytedb.hyperbyte.cloud/v1alpha1
kind: HyperbytedbCluster
metadata:
name: my-cluster
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1alpha1 contains API Schema definitions for the hyperbytedb v1alpha1 API group.
// +kubebuilder:object:generate=true
// +groupName=hyperbytedb.hyperbytedb.io
// +groupName=hyperbytedb.hyperbyte.cloud
package v1alpha1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "hyperbytedb.hyperbytedb.io", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "hyperbytedb.hyperbyte.cloud", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/hyperbytedbcluster_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func SetupHyperbytedbClusterWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:path=/mutate-hyperbytedb-hyperbytedb-io-v1alpha1-hyperbytedbcluster,mutating=true,failurePolicy=fail,sideEffects=None,groups=hyperbytedb.hyperbytedb.io,resources=hyperbytedbclusters,verbs=create;update,versions=v1alpha1,name=mhyperbytedbcluster.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/mutate-hyperbytedb-hyperbyte-cloud-v1alpha1-hyperbytedbcluster,mutating=true,failurePolicy=fail,sideEffects=None,groups=hyperbytedb.hyperbyte.cloud,resources=hyperbytedbclusters,verbs=create;update,versions=v1alpha1,name=mhyperbytedbcluster.kb.io,admissionReviewVersions=v1

func (w *HyperbytedbClusterWebhook) Default(_ context.Context, obj *HyperbytedbCluster) error {
if obj.Spec.Replicas == nil {
Expand Down Expand Up @@ -89,7 +89,7 @@ func (w *HyperbytedbClusterWebhook) Default(_ context.Context, obj *HyperbytedbC
return nil
}

// +kubebuilder:webhook:path=/validate-hyperbytedb-hyperbytedb-io-v1alpha1-hyperbytedbcluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=hyperbytedb.hyperbytedb.io,resources=hyperbytedbclusters,verbs=create;update,versions=v1alpha1,name=vhyperbytedbcluster.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/validate-hyperbytedb-hyperbyte-cloud-v1alpha1-hyperbytedbcluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=hyperbytedb.hyperbyte.cloud,resources=hyperbytedbclusters,verbs=create;update,versions=v1alpha1,name=vhyperbytedbcluster.kb.io,admissionReviewVersions=v1

func (w *HyperbytedbClusterWebhook) ValidateCreate(_ context.Context, obj *HyperbytedbCluster) (admission.Warnings, error) {
return validateCluster(obj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.20.1
name: hyperbytedbbackups.hyperbytedb.hyperbytedb.io
name: hyperbytedbbackups.hyperbytedb.hyperbyte.cloud
spec:
group: hyperbytedb.hyperbytedb.io
group: hyperbytedb.hyperbyte.cloud
names:
kind: HyperbytedbBackup
listKind: HyperbytedbBackupList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.20.1
name: hyperbytedbclusters.hyperbytedb.hyperbytedb.io
name: hyperbytedbclusters.hyperbytedb.hyperbyte.cloud
spec:
group: hyperbytedb.hyperbytedb.io
group: hyperbytedb.hyperbyte.cloud
names:
kind: HyperbytedbCluster
listKind: HyperbytedbClusterList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.20.1
name: hyperbytedbrestores.hyperbytedb.hyperbytedb.io
name: hyperbytedbrestores.hyperbytedb.hyperbyte.cloud
spec:
group: hyperbytedb.hyperbytedb.io
group: hyperbytedb.hyperbyte.cloud
names:
kind: HyperbytedbRestore
listKind: HyperbytedbRestoreList
Expand Down
6 changes: 3 additions & 3 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/hyperbytedb.hyperbytedb.io_hyperbytedbclusters.yaml
- bases/hyperbytedb.hyperbytedb.io_hyperbytedbbackups.yaml
- bases/hyperbytedb.hyperbytedb.io_hyperbytedbrestores.yaml
- bases/hyperbytedb.hyperbyte.cloud_hyperbytedbclusters.yaml
- bases/hyperbytedb.hyperbyte.cloud_hyperbytedbbackups.yaml
- bases/hyperbytedb.hyperbyte.cloud_hyperbytedbrestores.yaml
# +kubebuilder:scaffold:crdkustomizeresource

patches:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbbackup_admin_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over hyperbytedb.hyperbytedb.io.
# Grants full permissions ('*') over hyperbytedb.hyperbyte.cloud.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.

Expand All @@ -14,13 +14,13 @@ metadata:
name: hyperbytedbbackup-admin-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbbackups
verbs:
- '*'
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbbackups/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbbackup_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the hyperbytedb.hyperbytedb.io.
# Grants permissions to create, update, and delete resources within the hyperbytedb.hyperbyte.cloud.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.

Expand All @@ -14,7 +14,7 @@ metadata:
name: hyperbytedbbackup-editor-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbbackups
verbs:
Expand All @@ -26,7 +26,7 @@ rules:
- update
- watch
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbbackups/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbbackup_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to hyperbytedb.hyperbytedb.io resources.
# Grants read-only access to hyperbytedb.hyperbyte.cloud resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.

Expand All @@ -14,15 +14,15 @@ metadata:
name: hyperbytedbbackup-viewer-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbbackups
verbs:
- get
- list
- watch
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbbackups/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbcluster_admin_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over hyperbytedb.hyperbytedb.io.
# Grants full permissions ('*') over hyperbytedb.hyperbyte.cloud.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.

Expand All @@ -14,13 +14,13 @@ metadata:
name: hyperbytedbcluster-admin-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbclusters
verbs:
- '*'
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbclusters/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbcluster_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the hyperbytedb.hyperbytedb.io.
# Grants permissions to create, update, and delete resources within the hyperbytedb.hyperbyte.cloud.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.

Expand All @@ -14,7 +14,7 @@ metadata:
name: hyperbytedbcluster-editor-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbclusters
verbs:
Expand All @@ -26,7 +26,7 @@ rules:
- update
- watch
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbclusters/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbcluster_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to hyperbytedb.hyperbytedb.io resources.
# Grants read-only access to hyperbytedb.hyperbyte.cloud resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.

Expand All @@ -14,15 +14,15 @@ metadata:
name: hyperbytedbcluster-viewer-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbclusters
verbs:
- get
- list
- watch
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbclusters/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbrestore_admin_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over hyperbytedb.hyperbytedb.io.
# Grants full permissions ('*') over hyperbytedb.hyperbyte.cloud.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.

Expand All @@ -14,13 +14,13 @@ metadata:
name: hyperbytedbrestore-admin-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbrestores
verbs:
- '*'
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbrestores/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/hyperbytedbrestore_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project hyperbytedb-operator itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the hyperbytedb.hyperbytedb.io.
# Grants permissions to create, update, and delete resources within the hyperbytedb.hyperbyte.cloud.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.

Expand All @@ -14,7 +14,7 @@ metadata:
name: hyperbytedbrestore-editor-role
rules:
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbrestores
verbs:
Expand All @@ -26,7 +26,7 @@ rules:
- update
- watch
- apiGroups:
- hyperbytedb.hyperbytedb.io
- hyperbytedb.hyperbyte.cloud
resources:
- hyperbytedbrestores/status
verbs:
Expand Down
Loading
Loading