Conversation
| name: example-postgres | ||
| spec: | ||
| # Add fields here | ||
| size: 3 |
There was a problem hiding this comment.
What is the purpose of size field?
| kind: Role | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: postgres-operator-sdk-new |
There was a problem hiding this comment.
Looks like the Role name is defaulted to the folder name.
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: postgres-operator-sdk-new |
There was a problem hiding this comment.
Same issue as Role name.
| @@ -0,0 +1,10 @@ | |||
| package controller | |||
There was a problem hiding this comment.
What is the purpose of this file?
|
|
||
| // newReconciler returns a new reconcile.Reconciler | ||
| func newReconciler(mgr manager.Manager) reconcile.Reconciler { | ||
| return &ReconcilePostgres{client: mgr.GetClient(), scheme: mgr.GetScheme(), cache: mgr.GetCache()} |
There was a problem hiding this comment.
You can delete cache: mgr.GetCache()
| // add adds a new Controller to mgr with r as the reconcile.Reconciler | ||
| func add(mgr manager.Manager, r reconcile.Reconciler) error { | ||
| // Create a new controller | ||
| log.Print("I AM HERE\n") |
There was a problem hiding this comment.
Stray print line. Can be deleted.
| fmt.Printf("Check using: kubectl describe postgres %s \n", deploymentName) | ||
|
|
||
| pgresObj := instance | ||
| err2 := r.client.Get(context.TODO(), request.NamespacedName, pgresObj) |
There was a problem hiding this comment.
Why another Get call here?
| } | ||
|
|
||
| pgresObj2 := &postgresv1.Postgres{} | ||
| err3 := r.client.Get(context.TODO(), request.NamespacedName, pgresObj2) |
|
|
||
| func int32Ptr(i int32) *int32 { return &i } | ||
|
|
||
| // newbusyBoxPod demonstrates how to create a busybox pod |
There was a problem hiding this comment.
The newbusyBoxPod function can be deleted. It is not used anywhere.
| @@ -0,0 +1,288 @@ | |||
| # postgres-operator | |||
There was a problem hiding this comment.
Add this README to postgres-operator-sdk-new folder.
|
|
||
| ## Purpose of Experiment | ||
|
|
||
| --> Talk about the hypothesis of the experiment that Operator SDK might be less performant than sample-controller. |
There was a problem hiding this comment.
The lines here are mixed. Some of the them are directives of what the description should be about, and some contain the actual description of the experiment.
Delete the directive lines.
| ## Purpose of Experiment | ||
|
|
||
| --> Talk about the hypothesis of the experiment that Operator SDK might be less performant than sample-controller. | ||
| Give the reason why we think this might be the case. Refer to the Github issue about this from Operator SDK repo. |
There was a problem hiding this comment.
This is no longer relevant.
|
|
||
| --> Talk about the hypothesis of the experiment that Operator SDK might be less performant than sample-controller. | ||
| Give the reason why we think this might be the case. Refer to the Github issue about this from Operator SDK repo. | ||
| Refer to CloudARK blog on 'Writing Kubernetes Custom Controller' |
|
|
||
| ## Begin Experiment | ||
|
|
||
| --> Say that you will need 4 windows - create them. |
| - Number of API calls for add-db | ||
| - Number of API calls for add-user | ||
|
|
||
| Is it possible for you to distinguish above three calls in your log file? I think it should be possible. |
|
|
||
| ## Conclusion | ||
|
|
||
| --> Comment about what you learned from this research. |
|
|
||
| --> Comment about what you learned from this research. | ||
|
|
||
| What are the next steps? Is there any recommendation you can make to |
I kept the cache within the structure as we discussed.
All spots with r.client calls in the Controller are spots we must substitute the cache with.
I would appreciate comments on where I can retreieve the Postgres cache initially.
Thanks!