Skip to content

OSDOCS-34: Updating with the latest examples #14309

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 1 commit into from
Apr 17, 2019

Conversation

bergerhoffer
Copy link
Contributor

@openshift/team-documentation For peer review please.

@bergerhoffer bergerhoffer added peer-review-needed Signifies that the peer review team needs to review this PR branch/enterprise-4.1 labels Apr 1, 2019
@bergerhoffer bergerhoffer added this to the Future Release milestone Apr 1, 2019
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 1, 2019
@bergerhoffer
Copy link
Contributor Author

@lilic Could you take a look at these updates, based on the latest from your PR: operator-framework/operator-sdk#719

It looked like the updates were mostly to the code examples, but I made a few other adjustments. Let me know if you have any questions on any of the changes. Thanks!

You can preview the file here: http://file.rdu.redhat.com/~ahoffer/2019/OSDOCS-34/applications/operator_sdk/osdk-monitoring-prometheus.html

- See the
link:https://github.com/coreos/prometheus-operator/blob/7a25bf6b6bb2347dacb235659b73bc210117acc7/Documentation/design.md#servicemonitor[Prometheus Operator documentation]
for more about the ServiceMonitor CRD.
* See the
Copy link
Contributor

Choose a reason for hiding this comment

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

We are no longer linking to GitHub-hosted content per our user guide

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sferich888 I've heard that the request to not link to GitHub content came from you. Just wanted to run this one by you (since you made an exception in the CLI content) to make sure this is indeed a blanket statement and if this instance should be removed.

Just want to make sure I understand. Thanks!

Copy link
Contributor

@sferich888 sferich888 Apr 1, 2019

Choose a reason for hiding this comment

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

Why would we not link to downstream docs for that topic?

https://github.com/openshift/openshift-docs/blob/enterprise-4.0/monitoring/monitoring.adoc looks like it's missing content if you don't have something to link too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @sferich888, I'm not sure I understand what you're suggesting. It doesn't look like there is more information about ServiceMonitor in that file (which is here: https://docs.openshift.com/container-platform/4.0/monitoring/monitoring.html).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After discussing further with @sferich888, I opened https://jira.coreos.com/browse/OSDOCS-394 to cover adding the ServiceMonitor details into the docs, and removing this link altogether. Leaving this link as is for now, and will make that update in a separate PR.

@ahardin-rh ahardin-rh added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-needed Signifies that the peer review team needs to review this PR labels Apr 1, 2019
@ahardin-rh
Copy link
Contributor

@bergerhoffer Just one comment from me. Otherwise, this looks good!

@openshift-docs-preview-bot

The preview will be availble shortly at:

ns := "default"

// Pass the Service(s) to the helper function, which in turn returns the array of ServiceMonitor objects.
serviceMonitors, err := metrics.CreateServiceMonitors(restConfig, ns, services)

Choose a reason for hiding this comment

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

@lilic Do we need to add an instruction for the restConfig argument?

Copy link

Choose a reason for hiding this comment

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

Yes, that makes sense! This is usually done in the main.go file, so the restConfig refers to https://github.com/operator-framework/operator-sdk-samples/blob/master/memcached-operator/cmd/manager/main.go#L69

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lilic So should I add the following lines below the "ns := "default" line?

// Get a config to talk to the apiserver
restConfig := config.GetConfig()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lilic, @jianzhangbjz I added the above line and updated the PR if you want to take a look. Let me know whether that's right or not, thanks!

Choose a reason for hiding this comment

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

@bergerhoffer Thanks! But, for me, I think we just need to add a comment for the restConfig argument. @lilic What do you suggest?

Copy link

Choose a reason for hiding this comment

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

The only thing I would change is explicitly point out it's the Kubernetes apiserver config:

// restConfig is used for talking to the Kubernetes apiserver
restConfig := config.GetConfig()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jianzhangbjz @lilic Thank you both for the reviews, can you take a look at the updates and see if this looks good now?

ns := "default"

// Pass the Service(s) to the helper function, which in turn returns the array of ServiceMonitor objects.
serviceMonitors, err := metrics.CreateServiceMonitors(restConfig, ns, services)
Copy link

Choose a reason for hiding this comment

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

The only thing I would change is explicitly point out it's the Kubernetes apiserver config:

// restConfig is used for talking to the Kubernetes apiserver
restConfig := config.GetConfig()

Copy link

@lilic lilic left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@jianzhangbjz
Copy link

LGTM, thanks!

@bergerhoffer bergerhoffer changed the base branch from enterprise-4.0 to enterprise-4.1 April 17, 2019 13:20
@bergerhoffer bergerhoffer merged commit 539a5d6 into openshift:enterprise-4.1 Apr 17, 2019
@bergerhoffer bergerhoffer deleted the OSDOCS-34 branch January 22, 2020 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.1 peer-review-done Signifies that the peer review team has reviewed this PR size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants