initial commit

This commit is contained in:
allard committed 2025-11-23 18:58:51 +01:00
commit 376a944abc
1553 files changed
+314731

No files matched your search

+166
View File
@@ -0,0 +1,166 @@
# Check if ibmcloud is in user's account
ibmcloud_accountname=$(ibmcloud target --output json | jq -j '.account.name')
## check if account is in quicklabs (labs.cognitiveclass.ai) or workshop clusters account in DEG
if [ "$ibmcloud_accountname" = "QuickLabs - IBM Skills Network" ]; then
echo "\n"
echo "WARNING: You're logged in as ${ibmcloud_accountname}"
echo "Please log in again using -- ibmcloud login -u YOUR_IBM_CLOUD_EMAIL"
echo "and run this script again"
exit 1
elif [ "$ibmcloud_accountname" = "DEGCloud DEGCloud's Account" ]; then
echo "\n"
echo "WARNING: You're logged in as ${ibmcloud_accountname}"
echo "Please log in again using -- ibmcloud login -u YOUR_IBM_CLOUD_EMAIL"
echo "and run this script again"
exit 1
fi
# end check
RG=$(ibmcloud resource groups --default | grep -i ^default | awk '{print $1}')
ibmcloud target -g $RG
ibmcloud resource service-instance appid-example-bank
if [ "$?" -ne "0" ]; then
ibmcloud resource service-instance-create appid-example-bank appid lite us-south
fi
ibmcloud resource service-key appid-example-bank-credentials
if [ "$?" -ne "0" ]; then
ibmcloud resource service-key-create appid-example-bank-credentials Writer --instance-name appid-example-bank
fi
credentials=$(ibmcloud resource service-key appid-example-bank-credentials)
mgmturl=$(echo "$credentials" | awk '/managementUrl/{ print $2 }')
apikey=$(echo "$credentials" | awk '/apikey/{ print $2 }')
iamtoken=$(ibmcloud iam oauth-tokens | awk '/IAM/{ print $3" "$4 }')
printf "\nSetting cloud directory options\n"
response=$(curl -X PUT -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
-d '{
"isActive":true,
"config":
{
"selfServiceEnabled":true,
"interactions":
{
"identityConfirmation":
{
"accessMode":"OFF",
"methods": ["email"]
},
"welcomeEnabled":true,
"resetPasswordEnabled":true,
"resetPasswordNotificationEnable":true
},
"signupEnabled":true,
"identityField":"userName"
}
}' \
"${mgmturl}/config/idps/cloud_directory")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && printf "\nFAILED to set cloud directory options\n" && exit 1
printf "\nCreating application\n"
response=$(curl -X POST -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
-d '{"name": "mobile-simulator", "type": "regularwebapp"}' \
"${mgmturl}/applications")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && printf "\nFAILED to create application\n" && exit 1
clientid=$(echo "${response}" | head -n1 | jq -j '.clientId')
printf "\nDefining admin scope\n"
response=$(curl -X PUT -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
-d '{"scopes": ["admin"]}' \
"${mgmturl}/applications/$clientid/scopes")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && printf "\nFAILED to define admin scope\n" && exit 1
printf "\nDefining admin role\n"
response=$(curl -X POST -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
-d '{"name": "admin",
"access": [ {"application_id": "'$clientid'", "scopes": [ "admin" ]} ]
}' \
"${mgmturl}/roles")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "201" ] && printf "\nFAILED to define admin role\n" && exit 1
roleid=$(echo "${response}" | head -n1 | jq -j '.id')
printf "\nDefining admin user in cloud directory\n"
response=$(curl -X POST -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
-d '{"emails": [
{"value": "bankadmin@yopmail.com","primary": true}
],
"userName": "bankadmin",
"password": "password"
}' \
"${mgmturl}/cloud_directory/sign_up?shouldCreateProfile=true")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "201" ] && printf "\nFAILED to define admin user in cloud directory\n" && exit 1
printf "\nGetting admin user profile\n"
response=$(curl -X GET -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
"${mgmturl}/users?email=bankadmin@yopmail.com&dataScope=index")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && printf "\nFAILED to get admin user profile\n" && exit 1
userid=$(echo "${response}" | head -n1 | jq -j '.users[0].id')
printf "\nAdding admin role to admin user\n"
response=$(curl -X PUT -w "\n%{http_code}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: $iamtoken" \
-d '{"roles": { "ids": ["'$roleid'"]}}' \
"${mgmturl}/users/$userid/roles")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && printf "\nFAILED to add admin role to admin user\n" && exit 1
printf "\nApp ID instance created and configured"
printf "\nManagement server: $mgmturl"
printf "\nApi key: $apikey"
printf "\n"
+51
View File
@@ -0,0 +1,51 @@
MGMTEP=$1
APIKEY=$2
response=$(curl -k -v -X POST -w "\n%{http_code}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json" \
--data-urlencode "grant_type=urn:ibm:params:oauth:grant-type:apikey" \
--data-urlencode "apikey=$APIKEY" \
"https://iam.cloud.ibm.com/identity/token")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && exit 1
accesstoken=$(echo "${response}" | head -n1 | jq -j '.access_token')
response=$(curl -v -X GET -w "\n%{http_code}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $accesstoken" \
$MGMTEP/applications)
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && exit 1
tenantid=$(echo "${response}"| head -n1 | jq -j '.applications[0].tenantId')
clientid=$(echo "${response}"| head -n1 | jq -j '.applications[0].clientId')
secret=$(echo "${response}"| head -n1 | jq -j '.applications[0].secret')
oauthserverurl=$(echo "${response}"| head -n1 | jq -j '.applications[0].oAuthServerUrl')
appidhost=$(echo "${oauthserverurl}" | awk -F/ '{print $3}')
oc create secret generic bank-oidc-secret --from-literal=OIDC_JWKENDPOINTURL=$oauthserverurl/publickeys --from-literal=OIDC_ISSUERIDENTIFIER=$oauthserverurl --from-literal=OIDC_AUDIENCES=$clientid
oc create secret generic bank-appid-secret --from-literal=APPID_TENANTID=$tenantid --from-literal=APPID_SERVICE_URL=https://$appidhost
oc create secret generic bank-iam-secret --from-literal=IAM_APIKEY=$APIKEY --from-literal=IAM_SERVICE_URL=https://iam.cloud.ibm.com/identity/token
oc create secret generic mobile-simulator-secrets \
--from-literal=APP_ID_IAM_APIKEY=$APIKEY \
--from-literal=APP_ID_MANAGEMENT_URL=$MGMTEP \
--from-literal=APP_ID_CLIENT_ID=$clientid \
--from-literal=APP_ID_CLIENT_SECRET=$secret \
--from-literal=APP_ID_TOKEN_URL=$oauthserverurl \
--from-literal=PROXY_USER_MICROSERVICE=user-service:9080 \
--from-literal=PROXY_TRANSACTION_MICROSERVICE=transaction-service:9080
oc create secret generic bank-oidc-adminuser --from-literal=APP_ID_ADMIN_USER=bankadmin --from-literal=APP_ID_ADMIN_PASSWORD=password
oc create secret generic bank-db-secret --from-literal=DB_SERVERNAME=creditdb --from-literal=DB_PORTNUMBER=5432 --from-literal=DB_DATABASENAME=example --from-literal=DB_USER=postgres --from-literal=DB_PASSWORD=postgres
+20
View File
@@ -0,0 +1,20 @@
apiVersion: postgresql.dev4devs.com/v1alpha1
kind: Database
metadata:
generation: 1
name: creditdb
namespace: example-bank
spec:
databaseCpu: 30m
databaseCpuLimit: 60m
databaseMemoryLimit: 512Mi
databaseMemoryRequest: 128Mi
databaseName: example
databaseNameKeyEnvVar: POSTGRESQL_DATABASE
databasePassword: postgres
databasePasswordKeyEnvVar: POSTGRESQL_PASSWORD
databaseStorageRequest: 1Gi
databaseUser: postgres
databaseUserKeyEnvVar: POSTGRESQL_USER
image: centos/postgresql-96-centos7
size: 1
@@ -0,0 +1,48 @@
#!/bin/bash -x
# Delete resources before removing namespace
oc delete all --all -n example-bank
sleep 2
## begin delete openshift serverless
# delete knative-serving component
oc delete knativeservings.operator.knative.dev knative-serving -n knative-serving
oc delete namespace knative-serving
oc delete knativeeventings.operator.knative.dev knative-eventing -n knative-eventing
oc delete namespace knative-eventing
# delete subscription and clusterserviceversion of openshift serverless operator
oc delete subscription serverless-operator -n openshift-operators
oc delete csv $(oc get csv -n openshift-operators -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep serverless-operator) -n openshift-operators
## end of delete openshift serverless
# Service mesh cleanup
oc delete smcp --all -n istio-system
oc delete smmr --all -n istio-system
oc delete validatingwebhookconfiguration/openshift-operators.servicemesh-resources.maistra.io
oc delete mutatingwebhookconfigurations/openshift-operators.servicemesh-resources.maistra.io
oc delete -n openshift-operators daemonset/istio-node
oc delete clusterrole/istio-admin clusterrole/istio-cni clusterrolebinding/istio-cni
oc delete subs --all --all-namespaces
oc get crds -o name | grep '.*\.istio\.io' | xargs -r -n 1 oc delete
oc get crds -o name | grep '.*\.maistra\.io' | xargs -r -n 1 oc delete
oc get crds -o name | grep '.*\.kiali\.io' | xargs -r -n 1 oc delete
oc delete all --all -n istio-system
sleep 2
## Delete projects
oc delete project example-bank
oc delete project istio-system
## Delete jaeger,elasticsearch,kialia,servicemesh operators
oc delete csv -n openshift-operators $(oc get csv -n openshift-operators -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep 'elasticsearch-operator\|jaeger-operator\|kiali-operator\|servicemeshoperator')
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
echo "Deploying PostgreSQL 1/3"
kubectl apply -f pg_csv.yaml -f pg_sub.yaml -f pg_operatorgroup.yaml
echo "Deploying PostgreSQL 2/3"
sleep 5
kubectl apply -f pg_deploy.yaml
echo "Deploying PostgreSQL 2/3"
sleep 3
kubectl apply -f creditdb.yaml
@@ -0,0 +1,48 @@
echo "Creating OpenShift Serverless operator"
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: serverless-operator
namespace: openshift-operators
spec:
channel: "4.5"
name: serverless-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
sleep 5
echo "Creating Knative Serving component"
oc create namespace knative-serving
cat <<EOF | oc apply -f -
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
EOF
# sleep 3
# oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
# echo "."
# echo "."
# echo "######################################################"
# echo "Execute this command to check Knative Serving status: "
# echo "oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf \"%s=%s\\\n\" .type .status}}{{end}}'"
# echo "######################################################"
# echo "When the status of everything is TRUE, you can now deploy Knative Services"
sleep 5
echo "##################"
echo "Waiting for Knative Serving to be up"
while [ $(oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}' | grep -c True) -ne 4 ]; do
echo "##################"
echo "Status: "
oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
echo "##################"
echo "Waiting for Knative Serving to be up"
sleep 5
done
echo "OpenShift Serverless with Knative Serving is ready to be used!"
@@ -0,0 +1,72 @@
# Check if ibmcloud is in user's account
ibmcloud_accountname=$(ibmcloud target --output json | jq -j '.account.name')
## check if account is in quicklabs (labs.cognitiveclass.ai) or workshop clusters account in DEG
if [ "$ibmcloud_accountname" = "QuickLabs - IBM Skills Network" ]; then
echo "\n"
echo "WARNING: You're logged in as ${ibmcloud_accountname}"
echo "Please log in again using -- ibmcloud login -u YOUR_IBM_CLOUD_EMAIL"
echo "and run this script again"
exit 1
elif [ "$ibmcloud_accountname" = "DEGCloud DEGCloud's Account" ]; then
echo "\n"
echo "WARNING: You're logged in as ${ibmcloud_accountname}"
echo "Please log in again using -- ibmcloud login -u YOUR_IBM_CLOUD_EMAIL"
echo "and run this script again"
exit 1
fi
# end check
# Grabs appid-example-bank instance and gets api key and management url from appid-example-bank-credentials
credentials=$(ibmcloud resource service-keys --instance-name appid-example-bank --output JSON | jq -c '[ .[] | select( .name | contains("appid-example-bank-credentials")) ]' | jq -j '.[0].credentials')
APIKEY=$(echo "${credentials}" | jq -j '.apikey')
MGMTEP=$(echo "${credentials}" | jq -j '.managementUrl')
echo $APIKEY
echo $MGMTEP
response=$(curl -k -v -X POST -w "\n%{http_code}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json" \
--data-urlencode "grant_type=urn:ibm:params:oauth:grant-type:apikey" \
--data-urlencode "apikey=$APIKEY" \
"https://iam.cloud.ibm.com/identity/token")
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && exit 1
accesstoken=$(echo "${response}" | head -n1 | jq -j '.access_token')
response=$(curl -v -X GET -w "\n%{http_code}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $accesstoken" \
$MGMTEP/applications)
echo $response
code=$(echo "${response}" | tail -n1)
[ "$code" -ne "200" ] && exit 1
tenantid=$(echo "${response}"| head -n1 | jq -j '.applications[0].tenantId')
clientid=$(echo "${response}"| head -n1 | jq -j '.applications[0].clientId')
secret=$(echo "${response}"| head -n1 | jq -j '.applications[0].secret')
oauthserverurl=$(echo "${response}"| head -n1 | jq -j '.applications[0].oAuthServerUrl')
appidhost=$(echo "${oauthserverurl}" | awk -F/ '{print $3}')
# Creates secret from application credentials
oc create secret generic bank-oidc-secret --from-literal=OIDC_JWKENDPOINTURL=$oauthserverurl/publickeys --from-literal=OIDC_ISSUERIDENTIFIER=$oauthserverurl --from-literal=OIDC_AUDIENCES=$clientid
oc create secret generic bank-appid-secret --from-literal=APPID_TENANTID=$tenantid --from-literal=APPID_SERVICE_URL=https://$appidhost
oc create secret generic bank-iam-secret --from-literal=IAM_APIKEY=$APIKEY --from-literal=IAM_SERVICE_URL=https://iam.cloud.ibm.com/identity/token
oc create secret generic mobile-simulator-secrets \
--from-literal=APP_ID_IAM_APIKEY=$APIKEY \
--from-literal=APP_ID_MANAGEMENT_URL=$MGMTEP \
--from-literal=APP_ID_CLIENT_ID=$clientid \
--from-literal=APP_ID_CLIENT_SECRET=$secret \
--from-literal=APP_ID_TOKEN_URL=$oauthserverurl \
--from-literal=PROXY_USER_MICROSERVICE=user-service:9080 \
--from-literal=PROXY_TRANSACTION_MICROSERVICE=transaction-service:9080
+687
View File
@@ -0,0 +1,687 @@
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "postgresql.dev4devs.com/v1alpha1",
"kind": "Database",
"metadata": {
"name": "database"
},
"spec": {
"databaseCpu": "30m",
"databaseCpuLimit": "60m",
"databaseMemoryLimit": "512Mi",
"databaseMemoryRequest": "128Mi",
"databaseName": "example",
"databaseNameKeyEnvVar": "POSTGRESQL_DATABASE",
"databasePassword": "postgres",
"databasePasswordKeyEnvVar": "POSTGRESQL_PASSWORD",
"databaseStorageRequest": "1Gi",
"databaseUser": "postgres",
"databaseUserKeyEnvVar": "POSTGRESQL_USER",
"image": "centos/postgresql-96-centos7",
"size": 1
}
},
{
"apiVersion": "postgresql.dev4devs.com/v1alpha1",
"kind": "Backup",
"metadata": {
"name": "backup"
},
"spec": {
"awsAccessKeyId": "example-awsAccessKeyId",
"awsS3BucketName": "example-awsS3BucketName",
"awsSecretAccessKey": "example-awsSecretAccessKey",
"schedule": "0 0 * * *"
}
}
]
capabilities: Full Lifecycle
categories: Database
certified: "false"
containerImage: quay.io/dev4devs-com/postgresql-operator:0.1.1
createdAt: "2019-09-08T08:00:00Z"
description: Operator in Go developed using the Operator Framework to package,
install, configure and manage a PostgreSQL database. This project includes backup
feature.
olm.operatorGroup: example-bank-rgc7j
olm.operatorNamespace: example-bank
olm.targetNamespaces: example-bank
repository: https://github.com/dev4devs-com/postgresql-operator
support: Dev4Devs, Inc
generation: 1
labels:
olm.api.8a107ba44dd0f831: provided
olm.api.dc3543ba06e9f8a0: provided
name: postgresql-operator.v0.1.1
namespace: example-bank
resourceVersion: "72208"
selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/example-bank/clusterserviceversions/postgresql-operator.v0.1.1
uid: 9351e01d-bb3e-431d-8ec5-b2e069c6173e
spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- description: Backup is the Schema for the backups API
displayName: Database Backup
kind: Backup
name: backups.postgresql.dev4devs.com
resources:
- kind: CronJob
name: A Kubernetes Deployment
version: v1beta1
- kind: PersistentVolumeClaim
name: A Kubernetes PersistentVolumeClaim
version: v1
- kind: Service
name: A Kubernetes Service
version: v1
specDescriptors:
- description: 'Key ID of AWS S3 storage. Default Value: nil Required to create
the Secret with the data to allow send the backup files to AWS S3 storage.'
displayName: AWS S3 accessKey/token ID
path: awsAccessKeyId
- description: 'Name of AWS S3 storage. Default Value: nil Required to create
the Secret with the AWS data to allow send the backup files to AWS S3 storage.'
displayName: AWS S3 Bucket name
path: awsS3BucketName
- description: 'Secret/Token of AWS S3 storage. Default Value: nil Required
to create the Secret with the data to allow send the backup files to AWS
S3 storage.'
displayName: AWS S3 accessKey/token
path: awsSecretAccessKey
- description: 'Name of the secret with the AWS data credentials pre-existing
in the cluster Default Value: nil See here the template: https://github.com/integr8ly/backup-container-image/blob/master/templates/openshift/sample-config/s3-secret.yaml'
displayName: 'AWS Secret name:'
path: awsSecretName
- description: 'Namespace of the secret with the AWS data credentials pre-existing
in the cluster Default Value: nil NOTE: If the namespace be not informed
then the operator will try to find it in the same namespace where it is
applied'
displayName: 'AWS Secret namespace:'
path: awsSecretNamespace
- description: 'Name of the configMap key where the operator should looking
for the value for the database name for its env var Default value: nil'
displayName: ConfigMap Database Key
path: configMapDatabaseNameKey
- description: 'Name of the configMap key where the operator should looking
for the value for the database user for its env var Default value: nil'
displayName: ConfigMap Password Key
path: configMapDatabasePasswordKey
- description: 'Name of the configMap key where the operator should looking
for the value for the database password for its env var Default value: nil'
displayName: ConfigMap User Key
path: configMapDatabaseUserKey
- description: 'Name of the ConfigMap where the operator should looking for
the EnvVars keys and/or values only Default value: nil'
displayName: ConfigMap name
path: configMapName
- description: 'Policy definition to pull the Database Image More info: https://kubernetes.io/docs/concepts/containers/images/
Default value:'
displayName: Container Image Pull Policy
path: containerImagePullPolicy
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
- description: 'Name of the Database CR applied which this backup will work
with Default Value: "database"'
displayName: Name of Database CR
path: databaseCRName
- description: 'CPU resource request which will be available for the database
container Default value: 10Mi'
displayName: Database CPU
path: databaseCpu
- description: 'Limit of CPU request which will be available for the database
container Default value: 20Mi'
displayName: Database CPU Limit
path: databaseCpuLimit
- description: 'Limit of Memory which will be available for the database container
Default value: 512Mi'
displayName: Database Memory Limit
path: databaseMemoryLimit
- description: 'Limit of Memory Request which will be available for the database
container Default value: 128Mi'
displayName: Database Memory Request
path: databaseMemoryRequest
- description: 'Value for the Database Environment Variable (spec.databaseNameKeyEnvVar).
Default value: example'
displayName: Database Name
path: databaseName
- description: 'Key Value for the Database Environment Variable in order to
inform the database mame Note that each database version/image can expected
a different value for it. Default value: nil'
displayName: EnvVar Key (Database Name)
path: databaseNameKeyEnvVar
- description: 'Value for the Database Environment Variable (spec.databasePasswordKeyEnvVar).
Default value: postgres'
displayName: Database Password
path: databasePassword
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- description: 'Key Value for the Database Environment Variable in order to
inform the database password Note that each database version/image can expected
a different value for it. Default value: nil'
displayName: EnvVar Key (Database Password)
path: databasePasswordKeyEnvVar
- description: 'Limit of Storage Request which will be available for the database
container Default value: 1Gi'
displayName: Database Storage Request
path: databaseStorageRequest
- description: 'Value for the Database Environment Variable (spec.databaseUserKeyEnvVar).
Default value: postgres'
displayName: Database User
path: databaseUser
- description: 'Key Value for the Database Environment Variable in order to
inform the database user Note that each database version/image can expected
a different value for it. Default value: nil'
displayName: EnvVar Key (Database User)
path: databaseUserKeyEnvVar
- description: 'Database version. (E.g 9.6). Default Value: <9.6> IMPORTANT:
Just the first 2 digits should be used.'
displayName: Databaseversion
path: databaseVersion
- description: 'Name of the secret with the Encrypt data pre-existing in the
cluster Default Value: nil See here the template: https://github.com/integr8ly/backup-container-image/blob/master/templates/openshift/sample-config/gpg-secret.yaml'
displayName: 'EncryptKey Secret name:'
path: encryptKeySecretName
- description: 'Namespace of the secret with the Encrypt data pre-existing in
the cluster Default Value: nil NOTE: If the namespace be not informed then
the operator will try to find it in the same namespace where it is applied'
displayName: 'EncryptKey Secret namespace:'
path: encryptKeySecretNamespace
- description: 'GPG email to create the EncryptionKeySecret with this data Default
Value: nil See here how to create this key : https://help.github.com/en/articles/generating-a-new-gpg-key'
displayName: 'Gpg public email:'
path: gpgEmail
- description: 'GPG public key to create the EncryptionKeySecret with this data
Default Value: nil See here how to create this key : https://help.github.com/en/articles/generating-a-new-gpg-key'
displayName: 'Gpg public key:'
path: gpgPublicKey
- description: 'GPG trust model to create the EncryptionKeySecret with this
data. the default value is true when it is empty. Default Value: nil See
here how to create this key : https://help.github.com/en/articles/generating-a-new-gpg-key'
displayName: 'Gpg trust model:'
path: gpgTrustModel
- description: 'Database image:tag Default value: centos/postgresql-96-centos7'
displayName: Image:tag
path: image
- description: 'Image:tag used to do the backup. Default Value: <quay.io/integreatly/backup-container:1.0.8>
More Info: https://github.com/integr8ly/backup-container-image'
displayName: Image:tag
path: image
- description: 'Used to create the directory where the files will be stored
Default Value: <postgresql>'
displayName: AWS tag name
path: productName
- description: 'Schedule period for the CronJob. Default Value: <0 0 * * *>
daily at 00:00'
displayName: Schedule
path: schedule
- description: 'Quantity of instances Default value: 1'
displayName: Size
path: size
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podCount
statusDescriptors:
- description: Namespace of the secret object with the Aws data to allow send
the backup files to the AWS storage
displayName: AWS Secret Namespace
path: awsCredentialsSecretNamespace
- description: Name of the secret object with the Aws data to allow send the
backup files to the AWS storage
displayName: AWS Secret Name
path: awsSecretName
- description: Will be as "OK when all objects are created successfully
displayName: Backup Status
path: backupStatus
- description: Name of the CronJob object created and managed by it to schedule
the backup job
displayName: CronJob Name
path: cronJobName
- description: Status of the CronJob object
displayName: v1beta1.CronJobStatus
path: cronJobStatus
- description: It will be as "OK when all objects are created successfully
displayName: Database Status
path: databaseStatus
- description: Name of the secret object created with the database data to allow
the backup image connect to the database
displayName: Database Secret Name
path: dbSecretName
- description: Status of the Database Deployment created and managed by it
displayName: appsv1.DeploymentStatus
path: deploymentStatus
- description: Name of the secret object with the Encryption GPG Key
displayName: Encryption GPG Secret Name
path: encryptKeySecretName
- description: Namespace of the secret object with the Encryption GPG Key
displayName: Encryption GPG Secret Namespace
path: encryptKeySecretNamespace
- description: Boolean value which has true when it has an EncryptionKey to
be used to send the backup files
displayName: Is Encryption GPG Key configure?
path: hasEncryptKey
- description: Boolean value which has true when the Database Pod was found
in order to create the secret with the database data to allow the backup
image connect into it.
displayName: Is the Database Pod found?
path: isDatabasePodFound
- description: Boolean value which has true when the Service Database Pod was
found in order to create the secret with the database data to allow the
backup image connect into it.
displayName: Is the Database Service found?
path: isDatabaseServiceFound
- description: Name of the PersistentVolumeClaim created and managed by it
displayName: v1.PersistentVolumeClaimStatus
path: pvcStatus
- description: Status of the Database Service created and managed by it
displayName: v1.ServiceStatus
path: serviceStatus
version: v1alpha1
- description: Database is the Schema for the the Database Database API
displayName: Database Database
kind: Database
name: databases.postgresql.dev4devs.com
resources:
- kind: Deployment
name: A Kubernetes Deployment
version: v1
- kind: PersistentVolumeClaim
name: A Kubernetes PersistentVolumeClaim
version: v1
- kind: Service
name: A Kubernetes Service
version: v1
specDescriptors:
- description: 'Key ID of AWS S3 storage. Default Value: nil Required to create
the Secret with the data to allow send the backup files to AWS S3 storage.'
displayName: AWS S3 accessKey/token ID
path: awsAccessKeyId
- description: 'Name of AWS S3 storage. Default Value: nil Required to create
the Secret with the AWS data to allow send the backup files to AWS S3 storage.'
displayName: AWS S3 Bucket name
path: awsS3BucketName
- description: 'Secret/Token of AWS S3 storage. Default Value: nil Required
to create the Secret with the data to allow send the backup files to AWS
S3 storage.'
displayName: AWS S3 accessKey/token
path: awsSecretAccessKey
- description: 'Name of the secret with the AWS data credentials pre-existing
in the cluster Default Value: nil See here the template: https://github.com/integr8ly/backup-container-image/blob/master/templates/openshift/sample-config/s3-secret.yaml'
displayName: 'AWS Secret name:'
path: awsSecretName
- description: 'Namespace of the secret with the AWS data credentials pre-existing
in the cluster Default Value: nil NOTE: If the namespace be not informed
then the operator will try to find it in the same namespace where it is
applied'
displayName: 'AWS Secret namespace:'
path: awsSecretNamespace
- description: 'Name of the configMap key where the operator should looking
for the value for the database name for its env var Default value: nil'
displayName: ConfigMap Database Key
path: configMapDatabaseNameKey
- description: 'Name of the configMap key where the operator should looking
for the value for the database user for its env var Default value: nil'
displayName: ConfigMap Password Key
path: configMapDatabasePasswordKey
- description: 'Name of the configMap key where the operator should looking
for the value for the database password for its env var Default value: nil'
displayName: ConfigMap User Key
path: configMapDatabaseUserKey
- description: 'Name of the ConfigMap where the operator should looking for
the EnvVars keys and/or values only Default value: nil'
displayName: ConfigMap name
path: configMapName
- description: 'Policy definition to pull the Database Image More info: https://kubernetes.io/docs/concepts/containers/images/
Default value:'
displayName: Container Image Pull Policy
path: containerImagePullPolicy
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
- description: 'Name of the Database CR applied which this backup will work
with Default Value: "database"'
displayName: Name of Database CR
path: databaseCRName
- description: 'CPU resource request which will be available for the database
container Default value: 10Mi'
displayName: Database CPU
path: databaseCpu
- description: 'Limit of CPU request which will be available for the database
container Default value: 20Mi'
displayName: Database CPU Limit
path: databaseCpuLimit
- description: 'Limit of Memory which will be available for the database container
Default value: 512Mi'
displayName: Database Memory Limit
path: databaseMemoryLimit
- description: 'Limit of Memory Request which will be available for the database
container Default value: 128Mi'
displayName: Database Memory Request
path: databaseMemoryRequest
- description: 'Value for the Database Environment Variable (spec.databaseNameKeyEnvVar).
Default value: example'
displayName: Database Name
path: databaseName
- description: 'Key Value for the Database Environment Variable in order to
inform the database mame Note that each database version/image can expected
a different value for it. Default value: nil'
displayName: EnvVar Key (Database Name)
path: databaseNameKeyEnvVar
- description: 'Value for the Database Environment Variable (spec.databasePasswordKeyEnvVar).
Default value: postgres'
displayName: Database Password
path: databasePassword
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- description: 'Key Value for the Database Environment Variable in order to
inform the database password Note that each database version/image can expected
a different value for it. Default value: nil'
displayName: EnvVar Key (Database Password)
path: databasePasswordKeyEnvVar
- description: 'Limit of Storage Request which will be available for the database
container Default value: 1Gi'
displayName: Database Storage Request
path: databaseStorageRequest
- description: 'Value for the Database Environment Variable (spec.databaseUserKeyEnvVar).
Default value: postgres'
displayName: Database User
path: databaseUser
- description: 'Key Value for the Database Environment Variable in order to
inform the database user Note that each database version/image can expected
a different value for it. Default value: nil'
displayName: EnvVar Key (Database User)
path: databaseUserKeyEnvVar
- description: 'Database version. (E.g 9.6). Default Value: <9.6> IMPORTANT:
Just the first 2 digits should be used.'
displayName: Databaseversion
path: databaseVersion
- description: 'Name of the secret with the Encrypt data pre-existing in the
cluster Default Value: nil See here the template: https://github.com/integr8ly/backup-container-image/blob/master/templates/openshift/sample-config/gpg-secret.yaml'
displayName: 'EncryptKey Secret name:'
path: encryptKeySecretName
- description: 'Namespace of the secret with the Encrypt data pre-existing in
the cluster Default Value: nil NOTE: If the namespace be not informed then
the operator will try to find it in the same namespace where it is applied'
displayName: 'EncryptKey Secret namespace:'
path: encryptKeySecretNamespace
- description: 'GPG email to create the EncryptionKeySecret with this data Default
Value: nil See here how to create this key : https://help.github.com/en/articles/generating-a-new-gpg-key'
displayName: 'Gpg public email:'
path: gpgEmail
- description: 'GPG public key to create the EncryptionKeySecret with this data
Default Value: nil See here how to create this key : https://help.github.com/en/articles/generating-a-new-gpg-key'
displayName: 'Gpg public key:'
path: gpgPublicKey
- description: 'GPG trust model to create the EncryptionKeySecret with this
data. the default value is true when it is empty. Default Value: nil See
here how to create this key : https://help.github.com/en/articles/generating-a-new-gpg-key'
displayName: 'Gpg trust model:'
path: gpgTrustModel
- description: 'Database image:tag Default value: centos/postgresql-96-centos7'
displayName: Image:tag
path: image
- description: 'Image:tag used to do the backup. Default Value: <quay.io/integreatly/backup-container:1.0.8>
More Info: https://github.com/integr8ly/backup-container-image'
displayName: Image:tag
path: image
- description: 'Used to create the directory where the files will be stored
Default Value: <postgresql>'
displayName: AWS tag name
path: productName
- description: 'Schedule period for the CronJob. Default Value: <0 0 * * *>
daily at 00:00'
displayName: Schedule
path: schedule
- description: 'Quantity of instances Default value: 1'
displayName: Size
path: size
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podCount
statusDescriptors:
- description: Namespace of the secret object with the Aws data to allow send
the backup files to the AWS storage
displayName: AWS Secret Namespace
path: awsCredentialsSecretNamespace
- description: Name of the secret object with the Aws data to allow send the
backup files to the AWS storage
displayName: AWS Secret Name
path: awsSecretName
- description: Will be as "OK when all objects are created successfully
displayName: Backup Status
path: backupStatus
- description: Name of the CronJob object created and managed by it to schedule
the backup job
displayName: CronJob Name
path: cronJobName
- description: Status of the CronJob object
displayName: v1beta1.CronJobStatus
path: cronJobStatus
- description: It will be as "OK when all objects are created successfully
displayName: Database Status
path: databaseStatus
- description: Name of the secret object created with the database data to allow
the backup image connect to the database
displayName: Database Secret Name
path: dbSecretName
- description: Status of the Database Deployment created and managed by it
displayName: appsv1.DeploymentStatus
path: deploymentStatus
- description: Name of the secret object with the Encryption GPG Key
displayName: Encryption GPG Secret Name
path: encryptKeySecretName
- description: Namespace of the secret object with the Encryption GPG Key
displayName: Encryption GPG Secret Namespace
path: encryptKeySecretNamespace
- description: Boolean value which has true when it has an EncryptionKey to
be used to send the backup files
displayName: Is Encryption GPG Key configure?
path: hasEncryptKey
- description: Boolean value which has true when the Database Pod was found
in order to create the secret with the database data to allow the backup
image connect into it.
displayName: Is the Database Pod found?
path: isDatabasePodFound
- description: Boolean value which has true when the Service Database Pod was
found in order to create the secret with the database data to allow the
backup image connect into it.
displayName: Is the Database Service found?
path: isDatabaseServiceFound
- description: Name of the PersistentVolumeClaim created and managed by it
displayName: v1.PersistentVolumeClaimStatus
path: pvcStatus
- description: Status of the Database Service created and managed by it
displayName: v1.ServiceStatus
path: serviceStatus
version: v1alpha1
description: |-
A very flexible and customizable Operator in Go developed using the Operator Framework to package, install, configure and manage a PostgreSQL database. Also, the usage of this operator offers:
* Backup your data and sent it to a AWS Storage
* Usage of encryption to send the data
* Customization of the image and version of your PostgreSQL
* Customization of the enviroment variables keys and values which should be used with
* Allow you setup the operator to get the values required for its enviroment variables (user, password and database name) in an ConfigMap applied in the cluster already.
*NOTE: It is very useful to centralize and share this information accross the cluster for your solutions. Also, you are able to configure each configMap keys that contains each EnvVar* required for the PostgreSQL database image.
* To configure AWS Storage to sent the Backup data you are able to inform the data required or inform the secret which has this information and is applied in the cluster already
* To configure encryption feature in the Backup you are able to inform the data required or inform the secret which has this information and is applied in the cluster already
* Allow you customize the resources and their limmits (Memory, CPU and Storage)
displayName: PostgreSQL Operator by Dev4Ddevs.com
icon:
- base64data: iVBORw0KGgoAAAANSUhEUgAAANwAAADqCAMAAAD+p9sDAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURQAAAChbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgShbgf///zJmkChbgQAAAC5jjv7+/ipcgi9kji9kjwMDA/39/ilcgSRYf/3+/vz8/Stdg/39/TFlkClcgixegzFlj/r7/DVliR1Te3ybsxdOdzVpkhtRejBlj/z9/gcHByZZgB9UfP7+//j4+DxtljNnkfT2+fL1+Pz8/DlrlPn6+xISEuft8u3y9iFVfQ0NDSJXfuTr8fLy8j9wmNrj69/n7h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+EqBbsJGBVFD2r+CYFhaNmjOhs7Ftiys4z+vnmBSOuyKGEh4Gn5yRHsB30D0E2wCbc9lEjgPT4AQcPwdmcZ46QVADuuDrKUBqwzG6sQeZwu4XnKnYsfswRJ0Vq7UFYco/GNV7/FiKuroLine truncated
mediatype: image/png
install:
spec:
clusterPermissions:
- rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- list
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
- apiGroups:
- ""
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
- serviceaccounts
- rolebindings
- pods
- services
- service/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- postgresql-operator
- postgresql
- backup
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- apiGroups:
- postgresql-operator.dev4devs.com
resources:
- '*'
- backups
verbs:
- '*'
- apiGroups:
- postgresql.dev4devs.com
resources:
- '*'
- backups
verbs:
- '*'
serviceAccountName: postgresql-operator
deployments:
- name: postgresql-operator
spec:
replicas: 1
selector:
matchLabels:
name: postgresql-operator
strategy: {}
template:
metadata:
labels:
name: postgresql-operator
spec:
containers:
- command:
- postgresql-operator
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: postgresql-operator
image: quay.io/dev4devs-com/postgresql-operator:0.1.1
imagePullPolicy: Always
name: postgresql-operator
resources:
limits:
cpu: 60m
memory: 128Mi
requests:
cpu: 30m
memory: 64Mi
serviceAccountName: postgresql-operator
strategy: deployment
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: false
type: AllNamespaces
keywords:
- postgresql
- postgre
- database
- backup
- PostgreSQL
- dev4Devs-com
- backup
labels:
operated-by: postgresql-operator
links:
- name: Documentation
url: https://github.com/dev4devs-com/postgresql-operator/blob/master/README.adoc
- name: Source
url: https://github.com/dev4devs-com/postgresql-operator
- name: https://www.dev4devs.com/
url: https://www.dev4devs.com/
maintainers:
- email: dev4devs.com@gmail.com
name: Dev4Devs.com
maturity: alpha
minKubeVersion: 1.11.3
provider:
name: Dev4Devs.com
version: 0.1.1
+117
View File
@@ -0,0 +1,117 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 2
labels:
olm.owner: postgresql-operator.v0.1.1
olm.owner.kind: ClusterServiceVersion
olm.owner.namespace: example-bank
name: postgresql-operator
namespace: example-bank
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
name: postgresql-operator
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "postgresql.dev4devs.com/v1alpha1",
"kind": "Database",
"metadata": {
"name": "database"
},
"spec": {
"databaseCpu": "30m",
"databaseCpuLimit": "60m",
"databaseMemoryLimit": "512Mi",
"databaseMemoryRequest": "128Mi",
"databaseName": "example",
"databaseNameKeyEnvVar": "POSTGRESQL_DATABASE",
"databasePassword": "postgres",
"databasePasswordKeyEnvVar": "POSTGRESQL_PASSWORD",
"databaseStorageRequest": "1Gi",
"databaseUser": "postgres",
"databaseUserKeyEnvVar": "POSTGRESQL_USER",
"image": "centos/postgresql-96-centos7",
"size": 1
}
},
{
"apiVersion": "postgresql.dev4devs.com/v1alpha1",
"kind": "Backup",
"metadata": {
"name": "backup"
},
"spec": {
"awsAccessKeyId": "example-awsAccessKeyId",
"awsS3BucketName": "example-awsS3BucketName",
"awsSecretAccessKey": "example-awsSecretAccessKey",
"schedule": "0 0 * * *"
}
}
]
capabilities: Full Lifecycle
categories: Database
certified: "false"
containerImage: quay.io/dev4devs-com/postgresql-operator:0.1.1
createdAt: "2019-09-08T08:00:00Z"
description: Operator in Go developed using the Operator Framework to package,
install, configure and manage a PostgreSQL database. This project includes
backup feature.
olm.operatorGroup: example-bank-rgc7j
olm.operatorNamespace: example-bank
olm.targetNamespaces: example-bank
repository: https://github.com/dev4devs-com/postgresql-operator
support: Dev4Devs, Inc
creationTimestamp: null
labels:
name: postgresql-operator
spec:
containers:
- command:
- postgresql-operator
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: OPERATOR_NAME
value: postgresql-operator
image: quay.io/dev4devs-com/postgresql-operator:0.1.1
imagePullPolicy: Always
name: postgresql-operator
resources:
limits:
cpu: 60m
memory: 128Mi
requests:
cpu: 30m
memory: 64Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: postgresql-operator
serviceAccountName: postgresql-operator
terminationGracePeriodSeconds: 30
@@ -0,0 +1,12 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
annotations:
olm.providedAPIs: Backup.v1alpha1.postgresql.dev4devs.com,Database.v1alpha1.postgresql.dev4devs.com
generateName: example-bank-
generation: 1
name: example-bank-rgc7j
namespace: example-bank
spec:
targetNamespaces:
- example-bank
+12
View File
@@ -0,0 +1,12 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: postgresql-operator-dev4devs-com
namespace: example-bank
spec:
channel: alpha
installPlanApproval: Automatic
name: postgresql-operator-dev4devs-com
source: community-operators
sourceNamespace: openshift-marketplace
startingCSV: postgresql-operator.v0.1.1