Skip to content

Commit

Permalink
Merge pull request #54 from wallrj/hide-internal-crds
Browse files Browse the repository at this point in the history
Hide internal APIs from the OperatorHub UI
  • Loading branch information
wallrj committed Feb 15, 2022
2 parents 2cfbda4 + acbeb6d commit 48d71e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bundle/manifests/cert-manager.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ metadata:
capabilities: Full Lifecycle
categories: Security
containerImage: quay.io/jetstack/cert-manager-controller:v1.6.1
createdAt: '2022-02-08T17:42:41'
createdAt: '2022-02-15T21:48:43'
operators.operatorframework.io/builder: operator-sdk-v1.13.0+git
operators.operatorframework.io/internal-objects: |-
[
"challenge.acme.cert-manager.io",
"order.acme.cert-manager.io"
]
operators.operatorframework.io/project_layout: unknown
repository: https://github.com/jetstack/cert-manager
support: The cert-manager maintainers
Expand Down
9 changes: 9 additions & 0 deletions hack/fixup-csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Important ClusterServiceVersion (CSV) file references:
"""
import argparse
import base64
import json
import mimetypes
import sys
from datetime import datetime
Expand Down Expand Up @@ -67,6 +68,14 @@ def main():
for arch in conf["architectures"]
})

# Hide some internal APIs from the OperatorHub UI
# https://docs.okd.io/4.9/operators/operator_sdk/osdk-generating-csvs.html#osdk-hiding-internal-objects_osdk-generating-csvs
doc["metadata"]["annotations"]["operators.operatorframework.io/internal-objects"] = literal(
json.dumps([
"challenge.acme.cert-manager.io",
"order.acme.cert-manager.io",
], indent=4)
)
doc["metadata"]["annotations"]["capabilities"] = conf["capabilities"]
doc["metadata"]["annotations"]["categories"] = ",".join(conf["categories"])
doc["metadata"]["annotations"]["containerImage"] = doc["spec"]["install"]["spec"]["deployments"][0]["spec"]["template"]["spec"]["containers"][0]["image"]
Expand Down

0 comments on commit 48d71e4

Please sign in to comment.