Skip to content

Master #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 93 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
ed17705
update third-party dependencies
ting-lan-wang Nov 18, 2022
4e369ed
update oci-go-sdk
ting-lan-wang Nov 18, 2022
7c6ca30
bug 34836177
mmalvezz Dec 14, 2022
90561b6
Merge branch 'mmalvezz' into 'master'
mmalvezz Dec 14, 2022
bb757c1
Merge branch 'master' into tinglwan-update-libs
ting-lan-wang Dec 16, 2022
2370f0b
update libs
ting-lan-wang Dec 16, 2022
cf0cdaf
Update .gitlab-ci.yml file
ting-lan-wang Dec 16, 2022
a4131c1
Update .gitlab-ci.yml file
ting-lan-wang Dec 16, 2022
67c98d7
Update .gitlab-ci.yml file
yunus-qureshi Dec 21, 2022
b171222
Fix image digest determination in .gitlab-ci.yml
yunus-qureshi Jan 2, 2023
3fefa26
Add changes to pdb controller + usecase02
mmalvezz Jan 4, 2023
7df3fbf
Merge branch 'mmalvezz' into 'master'
mmalvezz Jan 4, 2023
62b33ee
Update .gitlab-ci.yml file
ting-lan-wang Jan 6, 2023
d686e19
Correct clone/create defect
mmalvezz Jan 11, 2023
2367ada
Merge branch 'mmalvezz' into 'master'
mmalvezz Jan 11, 2023
2241adb
Update Dockerfile
ting-lan-wang Jan 13, 2023
02f9086
Update .gitlab-ci.yml file
yunus-qureshi Dec 21, 2022
e6103ce
Fix image digest determination in .gitlab-ci.yml
yunus-qureshi Jan 2, 2023
29a5a14
Add changes to pdb controller + usecase02
mmalvezz Jan 4, 2023
d0ad6d4
Correct clone/create defect
mmalvezz Jan 11, 2023
acd471e
Merge branch 'tinglwan-update-libs' into 'master'
ting-lan-wang Jan 20, 2023
dd86d12
Unification of standby controller in singleinstancedatabase controller
Feb 7, 2023
488cdf6
Merge branch 'AbhiK_dg1' into 'master'
yunus-qureshi Feb 7, 2023
0bb532f
Fix status output column annotation for Sid
yunus-qureshi Feb 8, 2023
999d92a
Added some fixes
Feb 13, 2023
d8e03a1
Merge branch 'AbhiK_fix1' into 'master'
yunus-qureshi Feb 13, 2023
72ad2b2
Added some DG changes
Feb 15, 2023
16148a9
Merge branch 'AbhiK_fix2' into 'master'
yunus-qureshi Feb 15, 2023
89a15ff
Readme changes, and standby SID validation
Feb 17, 2023
79764a4
Merge branch 'AbhiK_fix3' into 'master'
yunus-qureshi Feb 17, 2023
f596f1d
Update docs/adb/README.md
ting-lan-wang Mar 23, 2023
e3a2c4d
fix bug 35287543
mmalvezz Apr 13, 2023
d2a9cbe
Merge branch 'mmalvezz' into 'master'
mmalvezz Apr 13, 2023
44c5ef7
Update .gitlab-ci.yml
yunus-qureshi Apr 20, 2023
f0115a5
merge ACD doc to ADB
ting-lan-wang Apr 21, 2023
23d99b9
Idesai 23c free support sidb operator
IshaanDesai45 May 4, 2023
554dd88
Merge branch 'idesai_23c_free_support_sidb_operator' into 'master'
yunus-qureshi May 4, 2023
8433fd9
Merge remote-tracking branch 'github/main'
yunus-qureshi May 9, 2023
49eb449
go mod tidy
yunus-qureshi May 9, 2023
3fa80db
bug 35357707
mmalvezz May 15, 2023
915dfb2
Merge branch 'mmalvezz' into 'master'
mmalvezz May 15, 2023
c763f2e
Ords Github bugs
vatsrahul May 23, 2023
1cf7f53
Merge branch 'ords_bugs' into 'master'
yunus-qureshi May 23, 2023
481d608
Dataguard Bugs Resolution
IshaanDesai45 May 23, 2023
eadd47f
Merge branch 'idesai_dg_bugs' into 'master'
yunus-qureshi May 23, 2023
4876e14
23c Free support and Dataguard Controller enhancements
IshaanDesai45 May 25, 2023
8520105
Merge branch 'idesai_free23c_enh' into 'master'
yunus-qureshi May 25, 2023
3ad2f3c
DG and SIDB bug fixes
IshaanDesai45 May 30, 2023
3930f51
Merge branch 'idesai_bug_fixes' into 'master'
yunus-qureshi May 30, 2023
04c0c0f
Bug Fixes DG and SIDB controllers
IshaanDesai45 Jun 5, 2023
7120d8d
Merge branch 'idesai_bug_fix' into 'master'
yunus-qureshi Jun 5, 2023
13751d9
Sidb Bug Fixes
IshaanDesai45 Jun 8, 2023
d2e55b4
Merge branch 'idesai_dg_release_fixes' into 'master'
yunus-qureshi Jun 8, 2023
693dd11
Fix lint errors
yunus-qureshi Jun 16, 2023
759402a
Merge branch 'fix_lint_errors' into 'master'
yunus-qureshi Jun 16, 2023
abf244d
Add commit env
yunus-qureshi Jun 16, 2023
a9fafaa
Merge branch 'add_commit_env' into 'master'
yunus-qureshi Jun 16, 2023
c7c3242
Fix log messaging
yunus-qureshi Jun 16, 2023
8ca8663
Merge branch 'fix_logging' into 'master'
yunus-qureshi Jun 16, 2023
ba834c0
Update docs/adb/ADB_MANUAL_BACKUP.md, docs/adb/README.md
ting-lan-wang Jun 16, 2023
7ed75ca
Update Dockerfile
yunus-qureshi Jun 19, 2023
e217d04
Minor doc style/spelling updates, and update copyright to 2022, 2023.
dwilliams-orcl Jun 20, 2023
dbaf4aa
Update THIRD_PARTY_LICENSES.txt
dwilliams-orcl Jun 23, 2023
44a1970
Merge branch 'douglas_williams-master-patch-04460' into 'master'
psaini79 Jun 23, 2023
087c0aa
Merge branch 'douglas_williams-master-patch-80977' into 'master'
psaini79 Jun 23, 2023
83f5f15
Update docs/adb/README.md to reflect consistency, spelling and style …
dwilliams-orcl Jun 23, 2023
e36db90
Merge branch 'douglas_williams-master-patch-71492' into 'master'
psaini79 Jun 23, 2023
0d0985c
Database Observer - Adding Observability controller changes
aberinnj Jun 23, 2023
cd3760b
Merge branch 'databaseObserver' into 'master'
psaini79 Jun 23, 2023
08f6d2e
Added Observability Controller
Jun 24, 2023
e819fda
Added Observability Controller
Jun 24, 2023
828bff6
Updated README.md
Jun 25, 2023
5a558c9
Added README.md Fixes
Jun 27, 2023
093fb95
Update the master Readme.
Kuassim Jun 27, 2023
cb16c5f
Update observability/Readme.md
Kuassim Jun 27, 2023
484289a
the below -> the following
rcitton Jun 27, 2023
9e49dcf
Replace acd-id-2.png
ting-lan-wang Jun 27, 2023
837a705
Readme changes
yunus-qureshi Jun 27, 2023
2bdae3f
Merge branch 'readme_changes' into 'master'
psaini79 Jun 27, 2023
2e7b98c
Update PREREQUISITES.md
yunus-qureshi Jun 28, 2023
ad16432
Update PREREQUISITES.md
yunus-qureshi Jun 28, 2023
a702680
Replaced operator with controller.
Kuassim Jun 28, 2023
0bddb69
Updated controller lifecycle operations
aberinnj Jun 28, 2023
c77523b
Merge branch 'norman_japheth_aberin-master-patch-08843' into 'master'
Kuassim Jun 28, 2023
2f245eb
Update README.md
yunus-qureshi Jun 28, 2023
9f9ba87
Updates for style and format updates as requested 29-Jun
dwilliams-orcl Jul 4, 2023
e81f69e
Merge branch 'douglas_williams-master-patch-39930' into 'master'
psaini79 Jul 4, 2023
9ff2abd
Revert observability controller branch
psaini79 Jul 4, 2023
24a90f9
Merge branch 'revert_observability_controller_branch' into 'master'
psaini79 Jul 4, 2023
9fd9401
Sidb readme fixes
yunus-qureshi Jul 5, 2023
dc3a767
Merge branch 'sidb-readme-fixes' into 'master'
yunus-qureshi Jul 5, 2023
bb81b8e
Added Doc fixes
Jul 6, 2023
7312e4a
Add production version
Jul 6, 2023
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ testbin/*
onpremtest/*
ords/*zip
.gitattributes
.vscode
.vscode
.gitlab-ci.yml
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
build-operator:
stage: build
variables:
IMAGE: "$DOCKER_REPO:$CI_COMMIT_BRANCH"
OP_YAML: oracle-database-operator.yaml
script:
- go version
- echo $CI_COMMIT_SHORT_SHA
- make docker-build IMG="$IMAGE"
- docker push "$IMAGE"
- newimage=$DOCKER_REPO@$(skopeo inspect docker://$IMAGE | jq -r .Digest)
- echo $newimage
- docker rmi "$IMAGE" && docker system prune -f
- make operator-yaml IMG=$newimage
- if [ "$CI_COMMIT_BRANCH" != "master" ]; then sed -i "s/\(replicas.\) 3/\1 1/g" ./$OP_YAML; fi
- curl -s --netrc-file $HOME/.netrc_gitlab $ARTIFACTORY_REPO/$CI_COMMIT_BRANCH/$OP_YAML -T ./$OP_YAML
only:
variables:
- $CI_COMMIT_MESSAGE =~ /\#run-pipeline/
- $CI_COMMIT_BRANCH =~ /master/
- $CI_MERGE_REQUEST_ID != ""
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\#skip-pipeline/
- $CI_COMMIT_TAG != null

cleanup:
stage: .post
script:
- echo "Clean up downloaded binaries"
- rm -rf bin/
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Build the manager binary
FROM golang:1.17 as builder
FROM golang:1.19 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -26,6 +26,10 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager

# Use oraclelinux:8-slim as base image to package the manager binary
FROM oraclelinux:8-slim
ARG CI_COMMIT_SHA
ARG CI_COMMIT_BRANCH
ENV COMMIT_SHA=${CI_COMMIT_SHA} \
COMMIT_BRANCH=${CI_COMMIT_BRANCH}
WORKDIR /
COPY --from=builder /workspace/manager .
RUN useradd -u 1002 nonroot
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go

docker-build: manifests generate fmt vet #test ## Build docker image with the manager. Disable the test but keep the validations to fail fast
docker build --no-cache=true --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} . -t ${IMG}

#docker-build-proxy: test
# docker build --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} build . -t ${IMG}
docker build --no-cache=true --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} \
--build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA} --build-arg CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH} . -t ${IMG}

docker-push: ## Push docker image with the manager.
docker push ${IMG}
Expand Down
13 changes: 13 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,17 @@ resources:
kind: DbcsSystem
path: github.com/oracle/oracle-database-operator/apis/database/v1alpha1
version: v1alpha1
- api:
crdVersion: v1beta1
namespaced: true
controller: true
domain: oracle.com
group: database
kind: DataguardBroker
path: github.com/oracle/oracle-database-operator/apis/database/v1alpha1
version: v1alpha1
webhooks:
defaulting: true
validation: true
webhookVersion: v1beta1
version: "3"
64 changes: 30 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# Oracle Database Operator for Kubernetes

## Make Oracle Database Kubernetes Native - Take 2
## Make Oracle Database Kubernetes Native

As part of Oracle's resolution to make Oracle Database Kubernetes-native (that is, observable and operable by Kubernetes), Oracle released _Oracle Database Operator for Kubernetes_ (`OraOperator` or the operator). OraOperator extends the Kubernetes API with custom resources and controllers for automating Oracle Database lifecycle management.
As part of Oracle's resolution to make Oracle Database Kubernetes native (that is, observable and operable by Kubernetes), Oracle released _Oracle Database Operator for Kubernetes_ (`OraOperator` or the operator). OraOperator extends the Kubernetes API with custom resources and controllers for automating Oracle Database lifecycle management.

In this v0.2.1 release, `OraOperator` supports the following database configurations and infrastructure:
In this v1.0.0 production release, `OraOperator` supports the following database configurations and infrastructure:

* Oracle Autonomous Database on shared Oracle Cloud Infrastructure (OCI) (ADB-S)
* Oracle Autonomous Database on dedicated Cloud infrastructure (ADB-D)
* Oracle Autonomous Database:
* Oracle Autonomous Database shared Oracle Cloud Infrastructure (OCI) (ADB-S)
* Oracle Autonomous Database on dedicated Cloud infrastructure (ADB-D)
* Oracle Autonomous Container Database (ACD) (infrastructure) the infrastructure for provisionning Autonomous Databases.
* Containerized Single Instance databases (SIDB) deployed in the Oracle Kubernetes Engine (OKE) and any k8s where OraOperator is deployed
* Containerized Sharded databases (SHARDED) deployed in OKE and any k8s where OraOperator is deployed
* Oracle Multitenant Databases (CDB/PDBs)
* Oracle Database Cloud Service (DBCS) (VMDB)
* Oracle Autonomous Container Database (ACD) (infrastructure) the infrastructure for provisionning Autonomous Databases.
* Oracle Base Database Cloud Service (BDBCS)
* Oracle Data Guard (Preview status)

Oracle will continue to extent OraOperator to support additional Oracle Database configurations.
Oracle will continue to extend `OraOperator` to support additional Oracle Database configurations.

## Features Summary

This release of Oracle Database Operator for Kubernetes (the operator) supports the following lifecycle operations:

* ADB-S: Provision, Bind, Start, Stop, terminate (soft/hard), scale (up/down), Manual Backup, Manual Restore
* ADB-D: provision, bind, start, stop, terminate (soft/hard), scale (up/down), Manual Backup, Manual Restore
* ADB-S/ADB-D: Provision, Bind, Start, Stop, terminate (soft/hard), scale (up/down), Manual Backup, Manual Restore
* ACD: provision, bind, restart, terminate (soft/hard)
* SIDB: Provision, clone, patch (in-place/out-of-place), update database initialization parameters, update database configuration (Flashback, archiving), Oracle Enterprise Manager (EM) Express (a basic observability console), Oracle REST Data Service (ORDS) to support REST based SQL, PDB management, SQL Developer Web, and Application Express (Apex)
* SHARDED: Provision/deploy sharded databases and the shard topology, Add a new shard, Delete an existing shard
* Oracle Multitenant Database: Bind to a CDB, Create a  PDB, Plug a  PDB, Unplug a PDB, Delete a PDB, Clone a PDB, Open/Close a PDB
* Database Cloud Service: Provision, Bind, Scale Up/Down, Liveness Probe, Manual Backup
* Oracle Base Database Cloud Service (BDBCS): provision, bind, scale shape Up/Down, Scale Storage Up, Terminate and Update License
* Oracle Data Guard: Provision a Standby for the SIDB resource, Create a Data Guard Configuration, Perform a Switchover, Patch Primary and Standby databases in Data Guard Configuration

The upcoming releases will support new configurations, operations and capabilities.

## Release Status

**CAUTION:** The current release of `OraOperator` (v0.2.1) is for development and testing only. DO NOT USE IN PRODUCTION.
This production release has been installed and tested on the following Kubernetes platforms:

This release has been installed and tested on the following Kubernetes platforms:

* [Oracle Container Engine for Kubernetes (OKE)](https://www.oracle.com/cloud-native/container-engine-kubernetes/) with Kubernetes 1.17 or later
* [Oracle Linux Cloud Native Environment(OLCNE)](https://docs.oracle.com/en/operating-systems/olcne/) 1.3 or later
* [Minikube](https://minikube.sigs.k8s.io/docs/) with version v1.21.0 or later
* [Oracle Container Engine for Kubernetes (OKE)](https://www.oracle.com/cloud-native/container-engine-kubernetes/) with Kubernetes 1.24
* [Oracle Linux Cloud Native Environment(OLCNE)](https://docs.oracle.com/en/operating-systems/olcne/) 1.6
* [Minikube](https://minikube.sigs.k8s.io/docs/) with version v1.29.0
* [Azure Kubernetes Service](https://azure.microsoft.com/en-us/services/kubernetes-service/)
* [Amazon Elastic Kubernetes Service](https://aws.amazon.com/eks/)
* [Red Hat OKD](https://www.okd.io/)
Expand All @@ -50,7 +50,7 @@ Oracle strongly recommends that you ensure your system meets the following [Prer

* ### Install cert-manager

The operator uses webhooks for validating user input before persisting it in Etcd. Webhooks require TLS certificates that are generated and managed by a certificate manager.
The operator uses webhooks for validating user input before persisting it in etcd. Webhooks require TLS certificates that are generated and managed by a certificate manager.

Install the certificate manager with the following command:

Expand All @@ -67,11 +67,6 @@ Oracle strongly recommends that you ensure your system meets the following [Prer
```sh
kubectl apply -f https://raw.githubusercontent.com/oracle/oracle-database-operator/main/oracle-database-operator.yaml
```
---
**NOTE:**
The above command will also upgrade the existing v0.2.0 `OraOperator` installation to the latest version i.e. v0.2.1.

---

Ensure that the operator pods are up and running. For high availability, Operator pod replicas are set to a default of 3. You can scale this setting up or down.

Expand All @@ -96,13 +91,13 @@ For more details, see [Oracle Database Operator Installation Instructions](./doc
The quickstarts are designed for specific database configurations:

* [Oracle Autonomous Database](./docs/adb/README.md)
* [Oracle Autonomous Container Database](./docs/acd/README.md)
* [Containerized Oracle Single Instance Database](./docs/sidb/README.md)
* [Oracle Autonomous Container Database](./docs/adb/ACD.md)
* [Containerized Oracle Single Instance Database and Data Guard](./docs/sidb/README.md)
* [Containerized Oracle Sharded Database](./docs/sharding/README.md)
* [Oracle Multitenant Database](./docs/multitenant/README.md)
* [Oracle Database Cloud Service](./docs/dbcs/README.md)
* [Oracle Base Database Cloud Service (BDBCS)](./docs/dbcs/README.md)

YAML file templates are available under [`/config/samples`](./config/samples/). You can copy and edit these template files to configure them for your use cases.
YAML file templates are available under [`/config/samples`](./config/samples/). You can copy and edit these template files to configure them for your use cases.

## Uninstall the Operator

Expand All @@ -123,17 +118,17 @@ YAML file templates are available under [`/config/samples`](./config/samples/).
kubectl delete autonomouscontainerdatabase.database.oracle.com --all -n <namespace>
kubectl delete cdb.database.oracle.com --all -n <namespace>
kubectl delete pdb.database.oracle.com --all -n <namespace>
kubectl delete dataguardbrokers.database.oracle.com --all -n <namespace>
```

After all CRD instances are deleted, it is safe to remove the CRDs, APISerivces and operator deployment. Use the following command:
After all CRD instances are deleted, it is safe to remove the CRDs, APIServices and operator deployment. To remove these files, use the following command:

```sh
kubectl delete -f oracle-database-operator.yaml --ignore-not-found=true
```

Note: If the CRD instances are not deleted, and the operator is deleted by using the preceding command, then operator deployment and instance objects (pods, services, PVCs, and so on) are deleted. However, if that happens, then the CRD deletion stops responding. This is because the CRD instances have properties that prevent their deletion, and that can only be removed by the operator pod, which is deleted when the APIServices are deleted.


## Docs of the supported Oracle Database configurations

* [Oracle Autonomous Database](https://docs.oracle.com/en-us/iaas/Content/Database/Concepts/adboverview.htm)
Expand All @@ -148,29 +143,30 @@ See [Contributing to this Repository](./CONTRIBUTING.md)

## Support

You can submit a GitHub issue, or you can also file an [Oracle Support service](https://support.oracle.com/portal/) request, using the product id: 14430.
You can submit a GitHub issue, and/or you file an [Oracle Support service](https://support.oracle.com/portal/) request, using this product ID: 14430.

## Security

Secure platforms are an important basis for general system security. Ensure that your deployment is in compliance with common security practices.

### Managing Sensitive Data

Kubernetes secrets are the usual means for storing credentials or passwords input for access. The operator reads the Secrets programmatically, which limits exposure of sensitive data. However, to protect your sensitive data, Oracle strongly recommends that you set and get sensitive data from Oracle Cloud Infrastructure Vault, or from third-party Vaults.

The following is an example of a YAML file fragment for specifying Oracle Cloud Infrastructure Vault as the repository for the admin password.
```

```yaml
adminPassword:
ociSecretOCID: ocid1.vaultsecret.oc1...
```

Examples in this repository where passwords are entered on the command line are for demonstration purposes only.

### Reporting a Security Issue

See [Reporting security vulnerabilities](./SECURITY.md)



## License

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.
Released under the Universal Permissive License v1.0 as shown at [https://oss.oracle.com/licenses/upl/](https://oss.oracle.com/licenses/upl/)
Loading