-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
apiVersion: v1 | ||
kind: ServiceAccount | ||
apiVersion: apps/v1 | ||
kind: Deployment |
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.
The ServiceAccount does not exist when kustomize generates deploy/kustomize/olm-bundle
. The Deployment references the same namespace and always exists, therefore it gets used.
operator/operator.make
Outdated
CATALOG_DIR=$(REPO_ROOT)/deploy/olm-catalog | ||
BUNDLE_DIR=$(REPO_ROOT)/deploy/olm-bundle/$(MAJOR_MINOR_PATCH_VERSION) | ||
CRD_DIR=$(REPO_ROOT)/deploy/crd | ||
CONTROLLER_GEN=_work/bin/controller-gen-$(CONTROLLER_GEN_VERSION) |
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.
I don't see a reason for using absolute paths. Doing everything relative to where we run make is easier.
cd $(REPO_ROOT) && $(CONTROLLER_GEN) crd:trivialVersions=true,crdVersions=v1 paths=./pkg/apis/... output:dir=$(CRD_DIR)/ | ||
version="$(shell $(CONTROLLER_GEN) --version |cut -f2 -d':')"; \ | ||
sed -i "1s/^/# This file was generated by controller-gen$$version via 'make operator-generate-crd'\n/" $(CRD_DIR)/* | ||
$(CONTROLLER_GEN) crd paths=./pkg/apis/... output:dir=$(CRD_DIR) |
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.
trivialVersions
was not recognized as parameter anymore. Do you know what it did?
crdVersions=v1
should be the default now.
rm -rf $(BUNDLE_DIR) | ||
mkdir -p $(BUNDLE_DIR) | ||
# Generate input YAML first. This might fail... | ||
_work/kustomize build --load-restrictor LoadRestrictionsNone $(MANIFESTS_DIR) >$(BUNDLE_DIR)/manifests.yaml |
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.
Directly piping the output caused me some head scratching because kustomize failed and I overlooked the one-line error message... Now make aborts directly.
_work/kustomize build --load-restrictor LoadRestrictionsNone $(MANIFESTS_DIR) >$(BUNDLE_DIR)/manifests.yaml | ||
# Specifying --kustomize-dir seems redundant because stdin already contains our ClusterServiceVersion, | ||
# but without it the final ClusterServiceVersion in the bundle just has some automatically generated fields. | ||
cat $(BUNDLE_DIR)/manifests.yaml | $< generate bundle --kustomize-dir=$(MANIFESTS_DIR) --version=$(MAJOR_MINOR_PATCH_VERSION) --output-dir=$(BUNDLE_DIR) --channels ${CHANNELS} --default-channel ${DEFAULT_CHANNEL} |
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.
operator-sdk wants a pipe as input, not an open file.
$(PATCH_VERSIONS) $(BUNDLE_DIR)/manifests/pmem-csi-operator.clusterserviceversion.yaml | ||
ifdef REPLACES | ||
@$(PATCH_REPLACES) $(BUNDLE_DIR)/manifests/pmem-csi-operator.clusterserviceversion.yaml | ||
$(PATCH_REPLACES) $(BUNDLE_DIR)/manifests/pmem-csi-operator.clusterserviceversion.yaml |
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.
Silently doing things made it harder to debug the make failure.
make test fails:
|
Fixed. Somehow I can no longer reproduce the validation error about the service account, which makes me nervous. Something is fishy here, but I don't know what it is. I've taken out the service account removal. |
b7861db
to
a93c3e6
Compare
c506520
to
230ce5d
Compare
The newer versions don't fix any specific issue that we are having, but staying closer to upstream is always good. For example, we can rule out that the ancient operator-sdk caused the install problem with OLM 0.19.1.
At least once the "direct-testing-metrics data full" test failed with: Dec 15 22:36:03.221: Timed out after 10.005s. Expected <string>: have pod IP Expected <string>: not to be empty GET failed Unexpected error: <*url.Error | 0xc000cb0e70>: { Op: "Get", URL: "http://default.format-node-hcz2c:10010/metrics", Err: <*errors.errorString | 0xc0015c9800>{ s: "dialer failed: unable to upgrade connection: pod not found (\"format-node-hcz2c_default\")", }, } Get "http://default.format-node-hcz2c:10010/metrics": dialer failed: unable to upgrade connection: pod not found ("format-node-hcz2c_default") occurred to be empty Better assertion annotations are necessary to understand which pod these assertions are about. If this was a pod that just began starting, then the 10s timeout may have been too short.
#1052 simplified the make rules for the OLM bundle. However, that had the effect that those rules now no longer can build the OLM bundle for the previous release, 1.0.1, which caused version skew testing to fail. The solution is to run make in the 1.0.1 source directory and thus use the make rules from that release. This is cleaner, too.
The newer versions don't fix any specific issue that we are having, but staying
closer to upstream is always good. For example, we can rule out that the
ancient operator-sdk caused the install problem with OLM 0.19.1.