{"id":22096861,"url":"https://github.com/streamnative/pulsar-resources-operator","last_synced_at":"2025-05-07T21:34:17.434Z","repository":{"id":44964611,"uuid":"438288060","full_name":"streamnative/pulsar-resources-operator","owner":"streamnative","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-06T15:10:24.000Z","size":1505,"stargazers_count":41,"open_issues_count":24,"forks_count":18,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-06T16:42:07.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamnative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-14T14:40:46.000Z","updated_at":"2025-05-05T02:45:06.000Z","dependencies_parsed_at":"2023-12-20T13:45:44.100Z","dependency_job_id":"377069b8-94ed-4477-bffd-7ad92ea37601","html_url":"https://github.com/streamnative/pulsar-resources-operator","commit_stats":{"total_commits":130,"total_committers":13,"mean_commits":10.0,"dds":0.5461538461538462,"last_synced_commit":"4b026713213dacf384b7734f6037d63d907ef96a"},"previous_names":[],"tags_count":96,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Fpulsar-resources-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Fpulsar-resources-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Fpulsar-resources-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Fpulsar-resources-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamnative","download_url":"https://codeload.github.com/streamnative/pulsar-resources-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252957403,"owners_count":21831485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T04:12:56.882Z","updated_at":"2025-05-07T21:34:17.425Z","avatar_url":"https://github.com/streamnative.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nAuthored by [StreamNative](https://streamnative.io), this Pulsar Resources Operator is a controller that manages the Pulsar resources automatically using the manifest on Kubernetes. Therefore, you can manage the Pulsar resources without the help of `pulsar-admin` or `pulsarctl` CLI tool. It is useful for initializing basic resources when creating a new Pulsar cluster.\n\nCurrently, the Pulsar Resources Operator provides full lifecycle management for the following Pulsar resources, including creation, update, and deletion. \n\n- [Tenants](docs/pulsar_tenant.md)\n- [Namespaces](docs/pulsar_namespace.md)\n- [Topics](docs/pulsar_topic.md)\n- [Permissions](docs/pulsar_permission.md)\n- [Packages](docs/pulsar_package.md)\n- [Functions](docs/pulsar_function.md)\n- [Sinks](docs/pulsar_sink.md)\n- [Sources](docs/pulsar_source.md)\n- [Geo-Replication](docs/pulsar_geo_replication.md)\n- [NS-Isolation-Policy](docs/pulsar_ns_isolation_policy.md)\n\n## Lifecycle Management\n\nThe Pulsar Resources Operator provides a flexible approach to managing the lifecycle of Pulsar resources through the `PulsarResourceLifeCyclePolicy`. This policy determines how Pulsar resources are handled when their corresponding Kubernetes custom resources are deleted. For more details on lifecycle management, please refer to the [PulsarResourceLifeCyclePolicy documentation](docs/pulsar_resource_lifecycle.md).\n\nThere are two available options for the lifecycle policy:\n\n1. `CleanUpAfterDeletion`: When set, the Pulsar resource (such as a tenant, namespace, or topic) will be deleted from the Pulsar cluster when its corresponding Kubernetes custom resource is deleted. This is the default policy.\n\n2. `KeepAfterDeletion`: When set, the Pulsar resource will remain in the Pulsar cluster even after its corresponding Kubernetes custom resource is deleted.\n\nYou can specify the lifecycle policy in the custom resource definition:\n\n```yaml\napiVersion: pulsar.streamnative.io/v1beta1\nkind: PulsarTenant\nmetadata:\n  name: my-tenant\nspec:\n  pulsarResourceLifeCyclePolicy: KeepAfterDeletion\n```\n\n# Installation\n\nThe Pulsar Resources Operator is an independent controller, it doesn’t need to be installed with the pulsar operator. You can install it when you need the feature. And it is built with the [Operator SDK](https://github.com/operator-framework/operator-sdk), which is part of the [Operator framework](https://github.com/operator-framework/).\n\nYou can install the Pulsar Resources Operator using the officially supported `pulsar-resources-operator` Helm [chart](https://github.com/streamnative/charts/tree/master/charts/pulsar-resources-operator). It provides Custom Resource Definitions (CRDs) and Controllers to manage the Pulsar resources.\n\n## Prerequisites\n\n- Install [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) (v1.16 - v1.24), compatible with your cluster (+/- 1 minor release from your cluster).\n- Install [`Helm`](https://helm.sh/docs/intro/install/) (v3.0.2 or higher).\n- Prepare a Kubernetes cluster (v1.16 - v1.24).\n- Prepare a [Pulsar cluster](https://docs.streamnative.io/operators/pulsar-operator/tutorial/deploy-pulsar)\n\n\n## Install Pulsar Resources Operator\n\nTo install the Pulsar Resources Operator, follow these steps.\n1. Add the StreamNative chart repository.\n    \n    ```shell\n    helm repo add streamnative https://charts.streamnative.io\n    helm repo update\n    ```\n\n2. Create a Kubernetes namespace.\n    \n    ```shell\n    kubectl create namespace \u003ck8s-namespace\u003e\n    ```\n    \u003e**Note**\n    \u003e\n    \u003e You can skip this step if you specify a Kubernetes namespace via the `-- create-namespace \u003ck8s-namespace\u003e` option when you install the operator.\n\n3. Install the operator using the `pulsar-resources-operator` Helm chart.\n    \n    ```shell\n    helm -n \u003ck8s-namespace\u003e install \u003crelease-name\u003e streamnative/pulsar-resources-operator\n    ```\n4. Verify that the operator is installed successfully\n    \n    ```shell\n    kubectl -n \u003ck8s-namespace\u003e get pods\n    ```\n\n    Expected outputs:\n\n    ```shell\n    NAME                                          READY       STATUS           RESTARTS      AGE\n    \u003crelease-name\u003e-pulsar-resources-operator      1/1         Running          0             2m2s\n    ```\n\n## Upgrade Pulsar Resources Operator\n\nTo upgrade the operator, execute the following command.\n\n```shell\nhelm repo update\nhelm -n \u003ck8s-namespace\u003e upgrade \u003crelease-name\u003e streamnative/pulsar-resources-operator\n```\n\n\u003e**Note**\n\u003e\n\u003e Don not forget to apply the latest crd files. Because there is no support for upgrading or deleting CRDs using Helm\n\u003e https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations\n\u003e You can use `helm pull streamnative/pulsar-resources-operator` to download the chart and unpack it, then apply the crds\n\n## Uninstall Pulsar Resources Operator\n\nTo uninstall the operator, execute the following command.\n\n```shell\nhelm -n \u003ck8s-namespace\u003e uninstall \u003crelease-name\u003e\n```\n\n# Tutorial\n\nThis tutorial guides you through creating Pulsar resources. You can create Pulsar resources automatically by applying resource manifest files  to the Kubernetes.\n\nBefore creating Pulsar resources, you must create a resource called `PulsarConnection`. The `PulsarConnection` covers the address of the Pulsar cluster and the authentication information. You can use this information to access a Pulsar cluster to create other resources.\n\nIn this tutorial, a Kubernetes namespace called `test` is used for examples, which is the namespace that the pulsar cluster installed.\n\n- [PulsarConnection](docs/pulsar_connection.md)\n- [PulsarResourceLifeCyclePolicy](docs/pulsar_resource_lifecycle.md)\n- [PulsarTenant](docs/pulsar_tenant.md)\n- [PulsarNamespace](docs/pulsar_namespace.md)\n- [PulsarTopic](docs/pulsar_topic.md)\n- [PulsarPermission](docs/pulsar_permission.md)\n- [PulsarPackage](docs/pulsar_package.md)\n- [PulsarFunction](docs/pulsar_function.md)\n- [PulsarSink](docs/pulsar_sink.md)\n- [PulsarSource](docs/pulsar_source.md)\n- [PulsarGeoReplication](docs/pulsar_geo_replication.md)\n- [NS-Isolation-Policy](docs/pulsar_ns_isolation_policy.md)\n- [StreamNativeCloudConnection](docs/streamnative_cloud_connection.md)\n- [ComputeWorkspace](docs/compute_workspace.md)\n- [ComputeFlinkDeployment](docs/compute_flink_deployment.md)\n- [StreamNative Cloud Secret](docs/secret.md)\n\n# Contributing\n\nContributions are warmly welcomed and greatly appreciated! \nThe project follows the typical GitHub pull request model.\nPlease read the [contribution guidelines](CONTRIBUTING.md) for more details.\n\nBefore starting any work, please either comment on an existing issue, or file a new one.\n\n## License\n\nThis library is licensed under the terms of the [Apache License 2.0](LICENSE) and may include packages written by third parties which carry their own copyright notices and license terms.\n\n## About StreamNative\n\nFounded in 2019 by the original creators of Apache Pulsar, [StreamNative](https://streamnative.io) is one of the leading contributors to the open-source Apache Pulsar project. We have helped engineering teams worldwide make the move to Pulsar with [StreamNative Cloud](https://streamnative.io/product), a fully managed service to help teams accelerate time-to-production.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamnative%2Fpulsar-resources-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamnative%2Fpulsar-resources-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamnative%2Fpulsar-resources-operator/lists"}