-
Notifications
You must be signed in to change notification settings - Fork 42
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
extraConfigs #77
extraConfigs #77
Conversation
controllers/druid/configuration.go
Outdated
}, nil | ||
} | ||
|
||
func (r *DruidReconciler) makeCommonConfigMap(ctx context.Context, m *v1alpha1.Druid, ls map[string]string) (*v1.ConfigMap, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets not add methods now. This will need a big change on all the code structure. Not just configmaps.
Ideally we would want another interface as druidBuilder
to expose this methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it from the Reconciler object. Will fix the e2e and ping you
@AdheipSingh ready with no new methods for the reconcile object. |
Generally, with this feature, we can then eliminate all other "common" fields and rename this to commonConfig which will be built from other ConfigMaps. |
Just updated the new chart version since it includes updated crd |
Thanks @itamar-marom . Merging it . |
Fixes #76
Fixes #75
Description
New field in the API:
Each
ConfigMap
can hold as many extra files as the user wants.The operator will go over the
ConfigMap
object, then will fetch all file names (key) and their content (value) from the ConfigMaps. It will add them to the common ConfigMap that is being mounted into the_common
directory.Had to refactor e2e to work smoothly without unnecessary long sleep commands + Added an E2E test to check the new feature.
Option 1: Mounting files as subPath - not good enough:
Kubernetes documentation states,
A container using a ConfigMap as a [subPath](https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath) volume will not receive ConfigMap updates.
Options 2: the above solution
ExtraCommonConfig
configuration.go
addExtraCommonConfig
that is being called inmakeCommonConfigMap
This PR has:
Key changed/added files in this PR
configuration.go