Skip to content

Conversation

@chatton
Copy link
Contributor

@chatton chatton commented Sep 11, 2020

All Submissions:

  • Have you signed our CLA?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

This PR updates the operator to configure the readiness probe in headless mode, instead of using just the health file as it was doing.

@chatton chatton added the wip label Sep 11, 2020
.github
.idea
agent
build/_output
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows us to use operator-sdk build for faster local development

See [here](deploy/crds/mongodb.com_v1_mongodb_openshift_cr.yaml) for an example of how to provide the required configuration for a MongoDB ReplicaSet.
See [here](deploy/operator_openshift.yaml) for an example of how to configure the Operator deployment.
See [here](deploy/openshift/operator_openshift.yaml) for an example of how to configure the Operator deployment.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved the openshift example into another directory so it is still possible to do. kubectl apply -f deploy/ without deploying the operator twice

Comment on lines +7 to +13
RUN apt-get update && \
apt-get install -y curl

ENV manifest_version=4.4
RUN mkdir -p /content/ \
&& chmod -R +r /content/ \
&& curl --fail --retry 3 -o /usr/local/version_manifest.json "https://opsmanager.mongodb.com/static/version_manifest/${manifest_version}.json"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small update to add the version manifest to the "faster" local dev build using operator-sdk build

),
container.WithEnvs(
corev1.EnvVar{
Name: headlessAgentEnv,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flag the readiness probe to go down the headless agent route

Comment on lines +620 to +633
},
corev1.EnvVar{
Name: podNamespaceEnv,
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
APIVersion: "v1",
FieldPath: "metadata.namespace",
},
},
},
corev1.EnvVar{
Name: automationConfigEnv,
Value: automationConfigSecretName,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provide the readiness probe information about which secret to read from

Copy link
Contributor

@rodrigovalin rodrigovalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

what do you think about renaming status.members to status.currentMembers or something similar that indicates that it is a transient value that moves towards spec.members... ? Like the readyReplicas from STS? (no need for this PR)

@chatton
Copy link
Contributor Author

chatton commented Sep 16, 2020

@rodrigovalin I like your suggestion about the renaming! I think we can do this separately like you said 👍

@chatton chatton merged commit 5fc56be into master Sep 16, 2020
@chatton chatton deleted the use_headloess_mode_readiness_probe branch September 16, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants