diff --git a/README.md b/README.md index c808637e..c8a676c1 100644 --- a/README.md +++ b/README.md @@ -121,11 +121,11 @@ Each of these must be appropriately built in preparation for a new tag: Run the following command inside this directory: - operator-sdk build geerlingguy/tower-operator:0.2.4 + operator-sdk build geerlingguy/tower-operator:0.2.5 Then push the generated image to Docker Hub: - docker push geerlingguy/tower-operator:0.2.4 + docker push geerlingguy/tower-operator:0.2.5 #### Build a new version of the `tower-operator.yaml` file @@ -141,6 +141,7 @@ Once the versions are updated, run the playbook in the `build/` directory: After it is built, test it on a local cluster: minikube start --memory 6g --cpus 4 + minikube addons enable ingress kubectl apply -f deploy/tower-operator.yaml kubectl create namespace example-tower kubectl apply -f deploy/crds/tower_v1alpha1_tower_cr_awx.yaml diff --git a/build/Dockerfile b/build/Dockerfile index 7d4e963b..d1de7374 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,8 +1,13 @@ -FROM quay.io/operator-framework/ansible-operator:v0.14.0 +FROM quay.io/operator-framework/ansible-operator:v0.16.0 # Install kubectl. COPY --from=lachlanevenson/k8s-kubectl:v1.16.5 /usr/local/bin/kubectl /usr/local/bin/kubectl +# Install Ansible requirements. +COPY requirements.yml ${HOME}/requirements.yml +RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \ + && chmod -R ug+rwx ${HOME}/.ansible + COPY watches.yaml ${HOME}/watches.yaml COPY main.yml ${HOME}/main.yml diff --git a/build/chain-operator-files.yml b/build/chain-operator-files.yml index 0bff8a7d..427a813a 100644 --- a/build/chain-operator-files.yml +++ b/build/chain-operator-files.yml @@ -6,7 +6,7 @@ gather_facts: false vars: - operator_image: geerlingguy/tower-operator:0.2.3 + operator_image: geerlingguy/tower-operator:0.2.5 pull_policy: Always operator_file_path: "../deploy/tower-operator.yaml" operator_template: "../deploy/operator.yaml" diff --git a/deploy/tower-operator.yaml b/deploy/tower-operator.yaml index a11677cb..abd1b5c9 100644 --- a/deploy/tower-operator.yaml +++ b/deploy/tower-operator.yaml @@ -107,14 +107,14 @@ spec: - /usr/local/bin/ao-logs - /tmp/ansible-operator/runner - stdout - image: "geerlingguy/tower-operator:0.2.3" + image: "geerlingguy/tower-operator:0.2.5" imagePullPolicy: "Always" volumeMounts: - mountPath: /tmp/ansible-operator/runner name: runner readOnly: true - name: operator - image: "geerlingguy/tower-operator:0.2.3" + image: "geerlingguy/tower-operator:0.2.5" imagePullPolicy: "Always" volumeMounts: - mountPath: /tmp/ansible-operator/runner diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 00000000..d8786266 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,4 @@ +--- +collections: + - community.kubernetes + - operator_sdk.util \ No newline at end of file