Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
estroz committed Aug 7, 2020
1 parent 0067c33 commit d2623b1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
23 changes: 16 additions & 7 deletions changelog/fragments/3-alpha-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
entries:
- description: >
Changed the go.sdk.operatorframework.io plugin to only write a `plugins` PROJECT field if the
project version is 3-alpha or above, as this field was introduced in this project version.
Changed the `go.sdk.operatorframework.io` plugin to only write a `plugins` PROJECT field and
run the OLM integration and scorecard plugins if the project version is "3-alpha" or above.
kind: change
breaking: false
breaking: true
migration:
header: Remove the `plugins` field from Go project's PROJECT file if it has `version: "2"`
header: Upgrade your project from version "2" to "3-alpha"
body: >
The SDK's default Go plugin no longer write a `plugins` PROJECT field if the
project version is "2", as this field was introduced in project version "3-alpha",
so remove this field and any data within it.
The SDK's default Go plugin no longer supports OLM- or scorecard-related project files
nor writes a `plugins` PROJECT field for projects scaffolded previously with
`operator-sdk init --project-version=2`, Please migrate to project version "3-alpha"
for support of these features by adding the following to your `PROJECT` file:
```yaml
version: "3-alpha" # Updated from "2"
projectName: <output of $(basename $(pwd))>
layout: go.kubebuilder.io/v2
plugins:
go.sdk.operatorframework.io/v2-alpha: {}
```
5 changes: 3 additions & 2 deletions internal/plugins/manifests/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ ifneq ($(origin DEFAULT_CHANNEL), undefined)
BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL)
endif
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
.PHONY: bundle
`

makefileBundleFragmentGo = `
# Generate bundle manifests and metadata, then validate generated files.
.PHONY: bundle
bundle: manifests
operator-sdk generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
Expand All @@ -93,6 +92,7 @@ bundle: manifests

makefileBundleFragmentNonGo = `
# Generate bundle manifests and metadata, then validate generated files.
.PHONY: bundle
bundle: kustomize
operator-sdk generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
Expand All @@ -102,6 +102,7 @@ bundle: kustomize

makefileBundleBuildFragment = `
# Build the bundle image.
.PHONY: bundle-build
bundle-build:
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
`
Expand Down
4 changes: 4 additions & 0 deletions website/content/en/docs/olm-integration/quickstart-bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ explanations of certain steps for brevity. The following documents contain more
If you are working with package manifests, see the [package manifests quickstart][quickstart-package-manifests]
once you have completed the *Setup* section below.

**Important:** this guide assumes your project was scaffolded with `operator-sdk init --project-version=3-alpha`.
These features are unavailable to projects of version `2` or less; this information can be found by inspecting
your `PROJECT` file's `version` value.

## Setup

Let's first walk through creating an Operator for `memcached`, a distributed key-value store.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ weight: 2
This guide assumes you have followed the introduction and *Setup* section of the [bundle quickstart][quickstart-bundle],
and have added the `packagemanifests` target to your `Makefile` as described [here][doc-olm-generate].

**Important:** this guide assumes your project was scaffolded with `operator-sdk init --project-version=3-alpha`.
These features are unavailable to projects of version `2` or less; this information can be found by inspecting
your `PROJECT` file's `version` value.

## Creating package manifests

We will now create a package manifests format by running `make packagemanifests` in the root of the memcached-operator project:
Expand Down

0 comments on commit d2623b1

Please sign in to comment.