@@ -21,20 +21,29 @@ catalog: $(OPERATOR_CATALOG_CONTRIBUTION)
21
21
# here are a few examples of different approaches to fulfilling this target
22
22
# comment out / customize the one that makes the most sense, or use them as examples in defining your own
23
23
#
24
- # --- BASIC VENEER ---
24
+ # --- BASIC TEMPLATE ---
25
25
# catalog: basic framework
26
26
#
27
- # --- SEMVER VENEER ---
27
+ # --- SEMVER TEMPLATE ---
28
28
# catalog: semver framework
29
29
#
30
- # --- COMPOUND VENEER ---
31
- # this case is for when a single veneer cannot support the use-case, and automated changes to the generated FBC need to be made before it is complete
30
+ # --- COMPOSITE TEMPLATE ---
31
+ # composite target processes a composite template to generate the FBC contributions
32
+ # `render-template composite` has `--validate` option enabled by default,
33
+ # so no subsequent validation is required
34
+ .PHONY : composite
35
+ composite : bin/opm
36
+ bin/opm alpha render-template composite -f catalogs.yaml -c contributions.yaml
37
+
38
+ #
39
+ # --- COMPOUND TEMPLATE ---
40
+ # this case is for when a single template cannot support the use-case, and automated changes to the generated FBC need to be made before it is complete
32
41
# this example models the need to set the v0.2.1 of the operator with the `olm.deprecated` property, to prevent installation
33
42
#
34
43
# catalog: $(YQ) semver framework
35
44
# $(YQ) eval 'select(.name == "testoperator.v0.2.1" and .schema == "olm.bundle").properties += [{"type" : "olm.deprecated", "value" : "true"}]' -i $(OPERATOR_CATALOG_CONTRIBUTION)
36
45
37
- # framework target provides two pieces that are helpful for any veneer approach:
46
+ # framework target provides two pieces that are helpful for any template approach:
38
47
# - an OWNERS file to provide default contribution control
39
48
# - an .indexignore file to illustrate how to add content to the FBC contribution which should be
40
49
# excluded from validation via `opm validate`
@@ -44,20 +53,20 @@ framework: CATALOG_OWNERS
44
53
echo "OWNERS" > $(OPERATOR_CATALOG_DIR)/.indexignore
45
54
46
55
47
- # basic target provides an example FBC generation from a `basic` veneer type.
56
+ # basic target provides an example FBC generation from a `basic` template type.
48
57
# this example takes a single file as input and generates a well-formed FBC operator contribution as an output
49
58
# the 'validate' target should be used next to validate the output
50
59
.PHONY : basic
51
- basic : bin/opm basic-veneer .yaml clean
52
- mkdir -p $(OPERATOR_CATALOG_DIR ) && bin/opm alpha render-veneer basic -o yaml basic-veneer .yaml > $(OPERATOR_CATALOG_CONTRIBUTION )
60
+ basic : bin/opm basic-template .yaml clean
61
+ mkdir -p $(OPERATOR_CATALOG_DIR ) && bin/opm alpha render-template basic -o yaml basic-template .yaml > $(OPERATOR_CATALOG_CONTRIBUTION )
53
62
54
63
55
- # semver target provides an example FBC generation from a `semver` veneer type.
64
+ # semver target provides an example FBC generation from a `semver` template type.
56
65
# this example takes a single file as input and generates a well-formed FBC operator contribution as an output
57
66
# the 'validate' target should be used next to validate the output
58
67
.PHONY : semver
59
- semver : bin/opm semver-veneer .yaml clean
60
- mkdir -p $(OPERATOR_CATALOG_DIR ) && bin/opm alpha render-veneer semver -o yaml semver-veneer .yaml > $(OPERATOR_CATALOG_CONTRIBUTION )
68
+ semver : bin/opm semver-template .yaml clean
69
+ mkdir -p $(OPERATOR_CATALOG_DIR ) && bin/opm alpha render-template semver -o yaml semver-template .yaml > $(OPERATOR_CATALOG_CONTRIBUTION )
61
70
62
71
63
72
# validate target illustrates FBC validation
@@ -68,7 +77,7 @@ validate: bin/opm $(OPERATOR_CATALOG_CONTRIBUTION) preverify
68
77
69
78
70
79
# preverify target ensures that the operator name is consistent between the destination directory and the generated catalog
71
- # since the veneer will be modified outside the build process but needs to be consistent with the directory name
80
+ # since the template will be modified outside the build process but needs to be consistent with the directory name
72
81
.PHONY : preverify
73
82
preverify : $(YQ ) $(OPERATOR_CATALOG_CONTRIBUTION )
74
83
./validate.sh -n $(OPERATOR_NAME ) -f $(OPERATOR_CATALOG_CONTRIBUTION )
81
90
82
91
OS =$(shell uname -s | tr '[:upper:]' '[:lower:]')
83
92
ARCH =$(shell uname -m | sed 's/x86_64/amd64/')
84
- OPM_VERSION ?= v1.26.1
93
+ OPM_VERSION ?= v1.36.0
85
94
bin/opm :
86
95
mkdir -p bin
87
96
curl -sLO https://github.com/operator-framework/operator-registry/releases/download/$(OPM_VERSION ) /$(OS ) -$(ARCH ) -opm && chmod +x $(OS ) -$(ARCH ) -opm && mv $(OS ) -$(ARCH ) -opm bin/opm
0 commit comments