-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
765db87
commit 83e3f53
Showing
9 changed files
with
175 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Azure | ||
|
||
See: | ||
|
||
- [Azure Service Operator for FlexibleServer](./psql/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Azure Service Operator - FlexibleServer for PostgreSQL | ||
|
||
Status: Experimental | ||
|
||
## Description | ||
|
||
This is a [Carvel Package] using the [Azure Service Operator v2] to manage Azure FlexibleServer for PostrgreSQL instances. | ||
|
||
[Azure Service Operator v2]: https://github.com/Azure/azure-service-operator/blob/v2.0.0-beta.2/README.md | ||
[Carvel Package]: https://carvel.dev/kapp-controller/docs/develop/packaging/ | ||
|
||
## Use | ||
|
||
For detailed instructions, follow the guide [Services Toolkit Documentation on FlexibleServer using ASO v2](https://docs.vmware.com/en/Services-Toolkit-for-VMware-Tanzu-Application-Platform/0.7/svc-tlk/GUID-usecases-consuming_azure_flexibleserver_psql_with_azure_operator.html) | ||
|
||
## Bundle | ||
|
||
For more information on customizing the bundle see [here][bundle], specifically | ||
the [values-schema]. Alternatively you can also see the configuration options | ||
with the tanzu CLI once the [package repo has been installed][repo-install] on | ||
your cluster: | ||
|
||
```sh | ||
tanzu package available get \ | ||
--values-schema psql.azure.references.services.apps.tanzu.vmware.com/0.0.1-alpha | ||
``` | ||
|
||
[bundle]: ../../../bundles/azure/aso/psql | ||
[values-schema]: ../../../bundles/azure/aso/psql/bundle/config/00-schema.yml | ||
[repo-install]: ../../../README.md#quick-start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: packaging.carvel.dev/v1alpha1 | ||
kind: PackageInstall | ||
metadata: | ||
name: psql-1 | ||
namespace: psql-1 | ||
spec: | ||
serviceAccountName: psql-install | ||
packageRef: | ||
refName: psql.azure.references.services.apps.tanzu.vmware.com | ||
versionSelection: | ||
constraints: 0.16.0 | ||
values: | ||
- secretRef: | ||
name: psql-1-values | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: psql-1-values | ||
namespace: psql-1 | ||
stringData: | ||
values.yml: | | ||
name: psql-1 | ||
namespace: psql-1 | ||
create_namespace: false | ||
aso_controller_namespace: azureserviceoperator-system | ||
resource_group: | ||
name: psql-1 | ||
use_existing_resource_group: false | ||
server: | ||
version: "13" | ||
administrator_name: trpadmin | ||
instance_type: Standard_D4s_v3 | ||
instance_tier: GeneralPurpose | ||
instance_storage_size_gb: 128 | ||
database: | ||
name: testdb | ||
firewall_rules: | ||
- startIpAddress: 0.0.0.0 | ||
endIpAddress: 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: psql-install | ||
namespace: psql-1 | ||
--- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: psql-install | ||
namespace: psql-1 | ||
rules: | ||
- apiGroups: ["dbforpostgresql.azure.com"] | ||
resources: ["flexibleservers","flexibleserversdatabases","flexibleserversfirewallrules"] | ||
verbs: ["*"] | ||
- apiGroups: ["resources.azure.com"] | ||
resources: ["resourcegroups"] | ||
verbs: ["*"] | ||
- apiGroups: ["secretgen.carvel.dev", "secretgen.k14s.io"] | ||
resources: ["secrettemplates","passwords"] | ||
verbs: ["*"] | ||
- apiGroups: [""] | ||
resources: ["serviceaccounts","configmaps"] | ||
verbs: ["*"] | ||
- apiGroups: [""] | ||
resources: ["namespaces"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["rbac.authorization.k8s.io"] | ||
resources: ["roles","rolebindings"] | ||
verbs: ["*"] | ||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: psql-install | ||
namespace: psql-1 | ||
subjects: | ||
- kind: ServiceAccount | ||
name: psql-install | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: psql-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Azure Service Operator - FlexibleServer for PostgreSQL | ||
|
||
Status: Experimental | ||
|
||
## Use | ||
|
||
For detailed instructions, follow the guide [Services Toolkit Documentation on FlexibleServer using ASO v2](https://docs.vmware.com/en/Services-Toolkit-for-VMware-Tanzu-Application-Platform/0.7/svc-tlk/GUID-usecases-consuming_azure_flexibleserver_psql_with_azure_operator.html) | ||
|
||
## Customize | ||
|
||
To customize the configuration of this Package Bundle modify the contents of `bundle` directory and follow the [Build](#build) steps. | ||
|
||
## Build | ||
|
||
>**Note**: This will be automated in the future | ||
To alter this Package, modify the contents and perform the following steps to build the Package Bundle image. These steps use the following: | ||
|
||
* [kbld](https://carvel.dev/kbld) | ||
* [imgpkg](https://carvel.dev/imgpkg) | ||
|
||
1. Build a new Package bundle image: | ||
|
||
```sh | ||
export REPO_HOST=<YOUR_IMAGE_REPO> #! e.g. ghcr.io/vmware-tanzu/tanzu-application-platform-reference-service-packages | ||
export BUNDLE_TAG=<YOUR_BUNDLE_TAG> #! e.g. latest | ||
|
||
pushd bundle | ||
kbld -f config/ --imgpkg-lock-output=.imgpkg/images.yml | ||
imgpkg push -b ${REPO_HOST}/psql.azure.references.services.apps.tanzu.vmware.com:$BUNDLE_TAG -f . | ||
popd | ||
``` | ||
|
||
1. Take the SHA produced by `imgpkg` and update `repository/packages/azure/psql/package.yml` by modifying `template.spec.fetch[0].imgpkgBundle.image` value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters