Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .helm/starter/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# AWX Operator Helm Chart
# Ascender Operator Helm Chart

This chart installs the AWX Operator resources configured in [this](https://github.com/ansible/awx-operator) repository.
This chart installs the Ascender Operator resources configured in [this](https://github.com/ctrliq/ascender-operator) repository.

## Getting Started
To configure your AWX resource using this chart, create your own `yaml` values file. The name is up to personal preference since it will explicitly be passed into the helm chart. Helm will merge whatever values you specify in your file with the default `values.yaml`, overriding any settings you've changed while allowing you to fall back on defaults. Because of this functionality, `values.yaml` should not be edited directly.

In your values config, enable `AWX.enabled` and add `AWX.spec` values based on the awx operator's [documentation](https://github.com/ansible/awx-operator/blob/devel/README.md). Consult the docs below for additional functionality.
In your values config, enable `AWX.enabled` and add `AWX.spec` values based on the Ascender operator's [documentation](https://github.com/ctrliq/ascender-operator/blob/devel/README.md). Consult the docs below for additional functionality.

### Installing

Expand All @@ -14,7 +14,7 @@ The operator's [helm install](https://ansible.readthedocs.io/projects/awx-operat
Example:

```bash
helm install my-awx-operator awx-operator/awx-operator -n awx --create-namespace -f myvalues.yaml
helm install my-ascender-operator ascender-operator/ascender-operator -n awx --create-namespace -f myvalues.yaml
Comment thread
cigamit marked this conversation as resolved.
Outdated
```

Argument breakdown:
Expand All @@ -33,7 +33,7 @@ There is no support at this time for upgrading or deleting CRDs using Helm. See
When upgrading to releases with CRD changes use the following command to update the CRDs

```bash
kubectl apply --server-side -k github.com/ansible/awx-operator/config/crd?ref=<VERSION>
kubectl apply --server-side -k github.com/ctrliq/ascender-operator/config/crd?ref=<VERSION>
```

If running above command results in an error like below:
Expand All @@ -56,11 +56,11 @@ See https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts
Use `--force-conflicts` flag to resolve the conflict.

```bash
kubectl apply --server-side --force-conflicts -k github.com/ansible/awx-operator/config/crd?ref=<VERSION>
kubectl apply --server-side --force-conflicts -k github.com/ctrliq/ascender-operator/config/crd?ref=<VERSION>
```

## Configuration
The goal of adding helm configurations is to abstract out and simplify the creation of multi-resource configs. The `AWX.spec` field maps directly to the spec configs of the `AWX` resource that the operator provides, which are detailed in the [main README](https://github.com/ansible/awx-operator/blob/devel/README.md). Other sub-config can be added with the goal of simplifying more involved setups that require additional resources to be specified.
The goal of adding helm configurations is to abstract out and simplify the creation of multi-resource configs. The `AWX.spec` field maps directly to the spec configs of the `AWX` resource that the operator provides, which are detailed in the [main README](https://github.com/ctrliq/ascender-operator/blob/devel/README.md). Other sub-config can be added with the goal of simplifying more involved setups that require additional resources to be specified.

These sub-headers aim to be a more intuitive entrypoint into customizing your deployment, and are easier to manage in the long-term. By design, the helm templates will defer to the manually defined specs to avoid configuration conflicts. For example, if `AWX.spec.postgres_configuration_secret` is being used, the `AWX.postgres` settings will not be applied, even if enabled.

Expand Down Expand Up @@ -351,7 +351,7 @@ Below the addition variables to customize the secret configuration.
Where possible, defer to `AWX.spec` configs before applying the abstracted configs to avoid collision. This can be facilitated by the `(hasKey .spec what_i_will_abstract)` check.

## Building and Testing
This chart is built using the Makefile in the [awx-operator repo](https://github.com/ansible/awx-operator). Clone the repo and run `make helm-chart`. This will create the awx-operator chart in the `charts/awx-operator` directory. In this process, the contents of the `.helm/starter` directory will be added to the chart.
This chart is built using the Makefile in the [ascender-operator repo](https://github.com/ctrliq/ascender-operator). Clone the repo and run `make helm-chart`. This will create the ascender-operator chart in the `charts/ascender-operator` directory. In this process, the contents of the `.helm/starter` directory will be added to the chart.

## Future Goals
All values under the `AWX` header are focused on configurations that use the operator. Configurations that relate to the Operator itself could be placed under an `Operator` heading, but that may add a layer of complication over current development.
Expand Down
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extends: default
ignore: |
.cache/
kustomization.yaml
awx-operator.clusterserviceversion.yaml
ascender-operator.clusterserviceversion.yaml
bundle
.helm/starter
hacking/
Expand Down
42 changes: 1 addition & 41 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,10 @@
# Changelog

This is a list of high-level changes for each release of `awx-operator`. A full list of commits can be found at `https://github.com/ansible/awx-operator/releases/tag/<version>`.
This is a list of high-level changes for each release of `ascender-operator`. A full list of commits can be found at `https://github.com/ctrliq/ascender-operator/releases/tag/<version>`.

# 0.19.0 (Mar 23, 2022)

- Fix corrupted spec for the service with nodeport type (kurokobo) - dbaf64e
- Add ability to deploy with OLM & added logo (Christian Adams) - 86c31a4
- Fix backup & restore issues with special characters in the postgres password (kurokobo) - 589a375
- Use centos:stream8 container where applicable (Shane McDonald)- 12a58d7
Comment thread
cigamit marked this conversation as resolved.

# 0.14.0 (Oct 03, 2021)

- Starting with awx-operator 0.14.0, the project is now based on operator-sdk 1.x.
- To avoid a headache, you probably want to delete your existing operator Deployment and follow the README.
- Starting with awx-operator 0.14.0, AWX can only be deployed in the namespace that the operator exists in. See [upgrade docs](./README.md#upgrading) for necessary cleanup actions. (Christian Adams) - 58c3ebf (breaking change)

# 0.10.0 (Jun 1, 2021)

- Make tower_ingress_type to respect ClusterIP definition (Marcelo Moreira de Mello) - e37c091 (breaking_change)
- Add ability to get/create/delete secrets for the awx service account (Christian M. Adams) - 61b3cb4
- Added ability to specify annotations to ServiceAccount (Marcelo Moreira de Mello) - 446ac0b
- Do not shadow other variables (Yanis Guenane) - 223fe98
- Do not prepend variables name with tower_ (Yanis Guenane) - 75458d0 (breaking_change)
- Fully remove finalizer (Christian M. Adams) - fd92050
- Use custom pg_dump format for faster restores (Christian M. Adams) - f16d9ac
- Allow user to specify empty string for storage class on PVC (Christian M. Adams) - 818b837
- Unset ownerRefs in the installer instead of the finalizer (Christian M. Adams) - c12a1f0
- Make awx-operator compatible with Ansible 2.12 (Alan Rominger) - 5216489
- Restore: set proper kind var after deploying AWX CR (Julen Landa Alustiza) - fc4687f
- Add support for custom service labels (Jeremy Kimber) - fd42802
- Rename product specific variable names (Christian M. Adams) - 5ae3636 (breaking_change)
- Add watcher for backup CR (Christian M. Adams) - fdcc745

# 0.9.0 (May 1, 2021)

- Update playbook to allow for deploying custom image version/tag (Shane McDonald) - 77e7039
- Mounts /var/lib/awx/projects on awx-web container (Marcelo Moreira de Mello) - f21ec4d
- Extra Settings: Allow one to pass extra API configuration settings. (Yanis Guenane) - 1d14ebc
- PostgreSQL: Properly handle variable name difference when using Red Hat containers (Yanis Guenane) - 2965a90
- Deployment type: Make more fields dynamic based on that field (Yanis Guenane) - 4706aa9
- Add templated EE volume mount var to operator config (Christian M. Adams) - e55d83f
- Add NodePort to tower_ingress_type enum (TheStally) - 96b878f
- Split container image and version in 2 variables (Marcelo Moreira de Mello) - bc34758 (breaking_change)
- Handles deleting and recreating statefulset and deployment when needed (Marcelo Moreira de Mello) - 597356f
- Add tower_ingress_type NodePort (stal) - 1b87616
- expose settings to use custom volumes and volume mounts (Gabe Muniz) - 8d65b84
- Inherit imagePullPolicy to redis container (Marcelo Moreira de Mello) - 83a85d1
- Add nodeSelector and tolerations for Postgres pod (Ernesto Pérez) - 151ff11
- Added support to override pg_sslmode (Marcelo Moreira de Mello) - 298d39c
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# AWX-Operator Contributing Guidelines
# Ascender-Operator Contributing Guidelines

Hi there! We're excited to have you as a contributor.

Have questions about this document or anything not covered here? Please file a new at [https://github.com/ansible/awx-operator/issues](https://github.com/ansible/awx-operator/issues).
Have questions about this document or anything not covered here? Please file a new at [https://github.com/ctrliq/ascender-operator/issues](https://github.com/ctrliq/ascender-operator/issues).
Comment thread
cigamit marked this conversation as resolved.
Outdated

## Table of contents

- [AWX-Operator Contributing Guidelines](#awx-operator-contributing-guidelines)
- [Ascender-Operator Contributing Guidelines](#ascender-operator-contributing-guidelines)
- [Table of contents](#table-of-contents)
- [Things to know prior to submitting code](#things-to-know-prior-to-submitting-code)
- [Submmiting your work](#submmiting-your-work)
Expand Down Expand Up @@ -38,7 +38,7 @@ Have questions about this document or anything not covered here? Please file a n
#> git add <FILES>
#> git commit -m "My message here"
```
5. Create your [pull request](https://github.com/ansible/awx-operator/pulls)
5. Create your [pull request](https://github.com/ctrliq/ascender-operator/pulls)

**Note**: If you have multiple commits, make sure to `squash` your commits into a single commit which will facilitate our release process.

Expand All @@ -60,7 +60,7 @@ If you want to actively develop the operator, use `molecule converge`, which doe

#### Testing in Kind

Testing with a kind cluster is the recommended way to test the awx-operator locally. First, you need to install kind if you haven't already. Please see these docs for setting that up:
Testing with a kind cluster is the recommended way to test the ascender-operator locally. First, you need to install kind if you haven't already. Please see these docs for setting that up:
* https://kind.sigs.k8s.io/docs/user/quick-start/

To run the tests, from the root of your checkout, run the following command:
Expand All @@ -79,12 +79,12 @@ To run the tests, from the root of your checkout, run the following command:

[Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) is a more full-featured test environment running inside a full VM on your computer, with an assigned IP address. This makes it easier to test things like NodePort services and Ingress from outside the Kubernetes cluster (e.g. in a browser on your computer).

Once the operator is deployed, you can visit the AWX UI in your browser by following these steps:
Once the operator is deployed, you can visit the Ascender UI in your browser by following these steps:

1. Make sure you have an entry like `IP_ADDRESS example-awx.test` in your `/etc/hosts` file. (Get the IP address with `minikube ip`.)
2. Visit `http://example-awx.test/` in your browser. (Default admin login is `test`/`changeme`.)

Alternatively, you can also update the service `awx-service` in your namespace to use the type `NodePort` and use following command to get the URL to access your AWX instance:
Alternatively, you can also update the service `awx-service` in your namespace to use the type `NodePort` and use following command to get the URL to access your Ascender instance:

```sh
#> minikube service <serviceName> -n <namespaceName> --url
Expand All @@ -101,25 +101,25 @@ At the root of this directory:
1. Build and publish the operator

```
#> operator-sdk build registry.example.com/ansible/awx-operator:mytag
#> podman push registry.example.com/ansible/awx-operator:mytag
#> operator-sdk build registry.example.com/ctrliq/ascender-operator:mytag
#> podman push registry.example.com/ctrliq/ascender-operator:mytag
```

2. Build and publish the bundle

```
#> podman build . -f bundle.Dockerfile -t registry.example.com/ansible/awx-operator-bundle:mytag
#> podman push registry.example.com/ansible/awx-operator-bundle:mytag
#> podman build . -f bundle.Dockerfile -t registry.example.com/ctrliq/ascender-operator-bundle:mytag
#> podman push registry.example.com/ctrliq/ascender-operator-bundle:mytag
```

3. Build and publish an index with your bundle in it

```
#> opm index add --bundles registry.example.com/ansible/awx-operator-bundle:mytag --tag registry.example.com/ansible/awx-operator-catalog:mytag
#> podman push registry.example.com/ansible/awx-operator-catalog:mytag
#> opm index add --bundles registry.example.com/ctrliq/ascender-operator-bundle:mytag --tag registry.example.com/ctrliq/ascender-operator-catalog:mytag
#> podman push registry.example.com/ctrliq/ascender-operator-catalog:mytag
```

4. In your Kubernetes create a new CatalogSource pointing to `registry.example.com/ansible/awx-operator-catalog:mytag`
4. In your Kubernetes create a new CatalogSource pointing to `registry.example.com/ctrliq/ascender-operator-catalog:mytag`

```
---
Expand All @@ -130,7 +130,7 @@ metadata:
namespace: <namespace>
spec:
displayName: 'myoperatorhub'
image: registry.example.com/ansible/awx-operator-catalog:mytag
image: registry.example.com/ctrliq/ascender-operator-catalog:mytag
publisher: 'myoperatorhub'
sourceType: grpc
```
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
# This variable is used to construct full image tags for bundle and catalog images.
#
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
# ansible.com/awx-operator-bundle:$VERSION and ansible.com/awx-operator-catalog:$VERSION.
# ansible.com/ascender-operator-bundle:$VERSION and ansible.com/ascender-operator-catalog:$VERSION.
IMAGE_TAG_BASE ?= ghcr.io/ctrliq/ascender-operator

# BUNDLE_IMG defines the image:tag used for the bundle.
Expand All @@ -58,13 +58,13 @@ endif

# Image URL to use all building/pushing image targets
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
NAMESPACE ?= awx
NAMESPACE ?= ascender
Comment thread
cigamit marked this conversation as resolved.

# Helm variables
CHART_NAME ?= awx-operator
CHART_DESCRIPTION ?= A Helm chart for the AWX Operator
CHART_NAME ?= ascender-operator
CHART_DESCRIPTION ?= A Helm chart for the Ascender Operator
CHART_OWNER ?= $(GH_REPO_OWNER)
CHART_REPO ?= awx-operator
CHART_REPO ?= ascender-operator
CHART_BRANCH ?= gh-pages
CHART_DIR ?= gh-pages
CHART_INDEX ?= index.yaml
Expand Down Expand Up @@ -341,7 +341,7 @@ helm-chart-generate: kustomize helm kubectl-slice yq charts
rm -rf charts/$(CHART_NAME)
# create new chart metadata in Chart.yaml
cd charts && \
$(HELM) create awx-operator --starter $(shell pwd)/.helm/starter ;\
$(HELM) create ascender-operator --starter $(shell pwd)/.helm/starter ;\
$(YQ) -i '.version = "$(VERSION)"' $(CHART_NAME)/Chart.yaml ;\
$(YQ) -i '.appVersion = "$(VERSION)" | .appVersion style="double"' $(CHART_NAME)/Chart.yaml ;\
$(YQ) -i '.description = "$(CHART_DESCRIPTION)"' $(CHART_NAME)/Chart.yaml ;\
Expand Down Expand Up @@ -371,13 +371,13 @@ helm-chart-generate: kustomize helm kubectl-slice yq charts
$(YQ) -i '.subjects[0].namespace = "{{ .Release.Namespace }}"' $${file};\
done
# Correct .metadata.name for cluster scoped resources
cluster_scoped_files="charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-metrics-reader.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-proxy-role.yaml";\
cluster_scoped_files="charts/$(CHART_NAME)/raw-files/clusterrolebinding-ascender-operator-proxy-rolebinding.yaml charts/$(CHART_NAME)/raw-files/clusterrole-ascender-operator-metrics-reader.yaml charts/$(CHART_NAME)/raw-files/clusterrole-ascender-operator-proxy-role.yaml";\
for file in $${cluster_scoped_files}; do\
$(YQ) -i '.metadata.name += "-{{ .Release.Name }}"' $${file};\
done

# Correct the reference for the clusterrolebinding
$(YQ) -i '.roleRef.name += "-{{ .Release.Name }}"' 'charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml'
$(YQ) -i '.roleRef.name += "-{{ .Release.Name }}"' 'charts/$(CHART_NAME)/raw-files/clusterrolebinding-ascender-operator-proxy-rolebinding.yaml'
# move all custom resource definitions to crds folder
mkdir charts/$(CHART_NAME)/crds
mv charts/$(CHART_NAME)/raw-files/customresourcedefinition*.yaml charts/$(CHART_NAME)/crds/.
Expand All @@ -389,7 +389,7 @@ helm-chart-generate: kustomize helm kubectl-slice yq charts
rm -rf charts/$(CHART_NAME)/raw-files

# create and populate NOTES.txt
@echo "AWX Operator installed with Helm Chart version $(VERSION)" > charts/$(CHART_NAME)/templates/NOTES.txt
@echo "Ascender Operator installed with Helm Chart version $(VERSION)" > charts/$(CHART_NAME)/templates/NOTES.txt

@echo "Helm chart successfully configured for $(CHART_NAME) version $(VERSION)"

Expand All @@ -399,7 +399,7 @@ helm-package: helm-chart
@echo "== Package Current Chart Version =="
mkdir -p .cr-release-packages
# package the chart and put it in .cr-release-packages dir
$(HELM) package ./charts/awx-operator -d .cr-release-packages/$(VERSION)
$(HELM) package ./charts/$(CHART_NAME) -d .cr-release-packages/$(VERSION)

# List all tags oldest to newest.
TAGS := $(shell git ls-remote --tags --sort=version:refname --refs -q | cut -d/ -f3)
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout:
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
projectName: awx-operator
projectName: ascender-operator
resources:
- api:
crdVersion: v1
Expand Down
Loading