Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Nov 27, 2018

This content is descended from openshift/installer@9c8a77dd (openshift/installer#377), but handling dynamic configuration is a generic issue, so the docs should live in the generic CVO repository. This will make these docs more discoverable. It will also allow the installer docs to focus on installer-specific issues for the small subset of operators that need direct installer bindings.

There are also two orthogonal copy-edit commits in this PR. I'm also fine pulling those out into a separate PR (or PRs), or with squashing them all into a single commit, if any of that would make review easier.

Also:

* Backticked 'image-references' and 'sed' instances and fixed a
  doubled space.
* Downcased "See" -> "see" in a parenthetical, because it's not a new
  sentence.
* Make "below" a link, since that's easier to follow than just the
  bare word.
* Changed "dir" -> "directory", because there's no need to abbreviate
  there.
It feels like the wording wanted this to be an enumerated list, but
the text landed without that markup in e046cd7 (docs/dev: Second
level operator FAQ, 2018-10-08, openshift#34).
This content is descended from openshift/installer@9c8a77dd (docs/dev:
Doc on how to integrate an operator, 2018-09-28,
openshift/installer#377), but handling dynamic configuration is a
generic issue, so the docs should live in the generic CVO repository.
This will make these docs more discoverable.  It will also allow the
installer docs to focus on installer-specific issues for the small
subset of operators that need direct installer bindings.
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 27, 2018
wking added a commit to wking/openshift-installer that referenced this pull request Nov 27, 2018
That approach should be documented in the CVO itself, since it's not
installer-specific and moving it gets the docs and implementation for
that approach into the same repository.  I've filed [1] to land
dynamic-object docs in the CVO repo (based on some of the content I'm
removing here).  Naming files, etc. are already covered by the
existing CVO documentation.

[1]: openshift/cluster-version-operator#59
Copy link

@rajatchopra rajatchopra left a comment

Choose a reason for hiding this comment

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

/lgtm
Minor nice to have about an inline example. All good nevertheless.

2. Generates the dynamic configuration based on the dependencies.
3. Pushes the generated configuration into the cluster, where future operator runs and other consumers will be able to find it.

For an example, see [the machine-API operator's `getOperatorConfig`][getOperatorConfig], although they don't need the "push the generated configuration into the cluster" step.

Choose a reason for hiding this comment

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

Maybe we should inline the example in a code block here.

Copy link
Member Author

@wking wking Nov 27, 2018

Choose a reason for hiding this comment

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

Maybe we should inline the example in a code block here.

How much of the code? e24bc29 currently links to the main portion of this, and I mention InClusterConfig further up but don't link to the operator's InClusterConfig call or client construction. Putting that all together into one example would be something like:

include (
  metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  "k8s.io/client-go/kubernetes"
  corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
  "k8s.io/client-go/rest"
)

func example() {
  config, err := rest.InClusterConfig() // FIXME: error handling
  client := kubernetes.NewForConfigOrDie(rest.AddUserAgent(config, "your-operator")).CoreV1().ConfigMaps("kube-system")
  for {
    config, err := getConfig(client) // FIXME: error handling
    // FIXME: do whatever your operator does
  }
}

func getConfig(client corev1.ConfigMapInterface) (FIXMESomeType, error) {
  clusterConfig, err := client.Get("cluster-config-v1", metav1.GetOptions{}) // FIXME: error handling
  return generateYourConfig(clusterConfig)
}

That's a lot of FIXMEs for things I've skipped, and it's still fairly involved. Is it particularly helpful when we're already linking folks to the not-much-more-complicated real-world machine-API operator implementation?

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rajatchopra, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link
Contributor

@rajatchopra: changing LGTM is restricted to assignees, and only openshift/cluster-version-operator repo collaborators may be assigned issues.

Details

In response to this:

/lgtm
Minor nice to have about an inline example. All good nevertheless.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@wking
Copy link
Member Author

wking commented Dec 5, 2018

/retest

@openshift-merge-robot
Copy link
Contributor

/retest

1 similar comment
@openshift-merge-robot
Copy link
Contributor

/retest

```

Ensure your image is published into the cluster release tag by ci-operator
Wait for a new release payload to be created (usually once you push to master in your operator).
Copy link

Choose a reason for hiding this comment

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

nit: will be nice to add a period - tag by ci-operator. Wait for a new release...

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 9, 2020

@wking: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-gcp-upgrade e24bc29 link /test e2e-gcp-upgrade
ci/prow/e2e-gcp e24bc29 link /test e2e-gcp
ci/prow/e2e e24bc29 link /test e2e
ci/prow/e2e-upgrade e24bc29 link /test e2e-upgrade

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
Copy link
Contributor

@wking: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic e24bc29 link /test e2e-agnostic
ci/prow/e2e-agnostic-upgrade e24bc29 link /test e2e-agnostic-upgrade
ci/prow/e2e-agnostic-operator e24bc29 link /test e2e-agnostic-operator

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 10, 2021
@openshift-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 9, 2021
@openshift-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 9, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 9, 2021

@wking: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot closed this May 9, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 9, 2021

@openshift-bot: Closed this PR.

Details

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

6 participants