Merge changes I8dc66d3e,I71ae592c
* changes:
Update operator docs
[Operator] As part of build copy updated CRDs to helm-chart
diff --git a/Documentation/operator.md b/Documentation/operator.md
index 0019a03..61b2cf7 100644
--- a/Documentation/operator.md
+++ b/Documentation/operator.md
@@ -33,7 +33,8 @@
This step compiles the Java source code into `.class` bytecode files in a newly
generated `operator/target` folder. A `gerrit-operator` image is also created
-locally.
+locally. Moreover, the CRD helm chart is updated with the latest CRDs as part of
+this build step.
## Versioning
@@ -186,8 +187,10 @@
#### gerrit-operator-crds
This chart installs the CRDs (k8s API extensions) to your k8s cluster. No chart
-values need to be modified. The CRDs installed are: GerritCluster, Gerrit,
-GitGarbageCollection, Receiver.
+values need to be modified. The build initiated by the `mvn install` command
+from the [Publish](#publish) section includes a step that updates the CRDs in
+this helm chart to reflect any changes made to them in the operator source code.
+The CRDs installed are: GerritCluster, Gerrit, GitGarbageCollection, Receiver.
You do not need to manually `helm install` this chart; this chart is installed
as a dependency of the second `gerrit-operator` helm chart as described in the
diff --git a/operator/pom.xml b/operator/pom.xml
index 6ec73ba..e73fcf2 100644
--- a/operator/pom.xml
+++ b/operator/pom.xml
@@ -284,6 +284,30 @@
</executions>
</plugin>
<plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.3.1</version>
+ <executions>
+ <execution>
+ <id>copy-crds</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>../helm-charts/gerrit-operator-crds/templates</outputDirectory>
+ <resources>
+ <resource>
+ <directory>target/classes/META-INF/fabric8</directory>
+ <includes>
+ <include>*-v1.yml</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.0</version>