Skip to content

Commit 99ee596

Browse files
committed
Committing chart build for test
1 parent fd44676 commit 99ee596

23 files changed

+1302
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
/bundle
55
/bundle_tmp*
66
/bundle.Dockerfile
7-
/charts
87
/.cr-release-packages
98
.vscode/
109
__pycache__

charts/awx-operator/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/awx-operator/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
appVersion: "0.26.0-60-gfd44676"
3+
description: A Helm chart for the AWX Operator
4+
name: awx-operator
5+
type: application
6+
version: 0.26.0-60-gfd44676

charts/awx-operator/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# AWX Operator Helm Chart
2+
3+
This chart installs the AWX Operator resources configured in [this](https://github.com/ansible/awx-operator) repository.
4+
5+
## Getting Started
6+
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.
7+
8+
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.
9+
10+
### Installing
11+
The operator's [helm install](https://github.com/ansible/awx-operator/blob/devel/README.md#helm-install-on-existing-cluster) guide provides key installation instructions.
12+
13+
Example:
14+
```
15+
helm install my-awx-operator awx-operator/awx-operator -n awx --create-namespace -f myvalues.yaml
16+
```
17+
18+
Argument breakdown:
19+
* `-f` passes in the file with your custom values
20+
* `-n` sets the namespace to be installed in
21+
* This value is accessed by `{{ $.Release.Namespace }}` in the templates
22+
* Acts as the default namespace for all unspecified resources
23+
* `--create-namespace` specifies that helm should create the namespace before installing
24+
25+
To update an existing installation, use `helm upgrade` instead of `install`. The rest of the syntax remains the same.
26+
27+
## Configuration
28+
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.
29+
30+
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.
31+
32+
### External Postgres
33+
The `AWX.postgres` section simplifies the creation of the external postgres secret. If enabled, the configs provided will automatically be placed in a `postgres-config` secret and linked to the `AWX` resource. For proper secret management, the `AWX.postgres.password` value, and any other sensitive values, can be passed in at the command line rather than specified in code. Use the `--set` argument with `helm install`.
34+
35+
36+
## Values Summary
37+
38+
### AWX
39+
| Value | Description | Default |
40+
|---|---|---|
41+
| `AWX.enabled` | Enable this AWX resource configuration | `false` |
42+
| `AWX.name` | The name of the AWX resource and default prefix for other resources | `"awx"` |
43+
| `AWX.spec` | specs to directly configure the AWX resource | `{}` |
44+
| `AWX.postgres` | configurations for the external postgres secret | - |
45+
46+
47+
# Contributing
48+
49+
## Adding abstracted sections
50+
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.
51+
52+
## Building and Testing
53+
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.
54+
55+
## Future Goals
56+
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.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
labels:
5+
helm.sh/chart: awx-operator-0.26.0-60-gfd44676
6+
name: awxbackups.awx.ansible.com
7+
spec:
8+
group: awx.ansible.com
9+
names:
10+
kind: AWXBackup
11+
listKind: AWXBackupList
12+
plural: awxbackups
13+
singular: awxbackup
14+
scope: Namespaced
15+
versions:
16+
- name: v1beta1
17+
schema:
18+
openAPIV3Schema:
19+
description: Schema validation for the AWXBackup CRD
20+
properties:
21+
apiVersion:
22+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
type: string
24+
kind:
25+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
26+
type: string
27+
metadata:
28+
type: object
29+
spec:
30+
properties:
31+
backup_pvc:
32+
description: Name of the backup PVC
33+
type: string
34+
backup_pvc_namespace:
35+
description: (Deprecated) Namespace the PVC is in
36+
type: string
37+
backup_resource_requirements:
38+
description: Resource requirements for the management pod used to create a backup
39+
properties:
40+
limits:
41+
properties:
42+
cpu:
43+
type: string
44+
memory:
45+
type: string
46+
type: object
47+
requests:
48+
properties:
49+
cpu:
50+
type: string
51+
memory:
52+
type: string
53+
type: object
54+
type: object
55+
backup_storage_class:
56+
description: Storage class to use when creating PVC for backup
57+
type: string
58+
backup_storage_requirements:
59+
description: Storage requirements for backup PVC (may be similar to existing postgres PVC backing up from)
60+
type: string
61+
clean_backup_on_delete:
62+
description: Flag to indicate if backup should be deleted on PVC if AWXBackup object is deleted
63+
type: boolean
64+
deployment_name:
65+
description: Name of the deployment to be backed up
66+
type: string
67+
no_log:
68+
default: true
69+
description: Configure no_log for no_log tasks
70+
type: boolean
71+
postgres_image:
72+
description: Registry path to the PostgreSQL container to use
73+
type: string
74+
postgres_image_version:
75+
description: PostgreSQL container image version to use
76+
type: string
77+
postgres_label_selector:
78+
description: Label selector used to identify postgres pod for backing up data
79+
type: string
80+
set_self_labels:
81+
default: true
82+
description: Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)
83+
type: boolean
84+
required:
85+
- deployment_name
86+
type: object
87+
x-kubernetes-preserve-unknown-fields: true
88+
status:
89+
properties:
90+
backupClaim:
91+
description: Backup persistent volume claim
92+
type: string
93+
backupDirectory:
94+
description: Backup directory name on the specified pvc
95+
type: string
96+
conditions:
97+
description: The resulting conditions when a Service Telemetry is instantiated
98+
items:
99+
properties:
100+
lastTransitionTime:
101+
type: string
102+
reason:
103+
type: string
104+
status:
105+
type: string
106+
type:
107+
type: string
108+
type: object
109+
type: array
110+
type: object
111+
x-kubernetes-preserve-unknown-fields: true
112+
type: object
113+
served: true
114+
storage: true
115+
subresources:
116+
status: {}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
labels:
5+
helm.sh/chart: awx-operator-0.26.0-60-gfd44676
6+
name: awxrestores.awx.ansible.com
7+
spec:
8+
group: awx.ansible.com
9+
names:
10+
kind: AWXRestore
11+
listKind: AWXRestoreList
12+
plural: awxrestores
13+
singular: awxrestore
14+
scope: Namespaced
15+
versions:
16+
- name: v1beta1
17+
schema:
18+
openAPIV3Schema:
19+
description: Schema validation for the AWXRestore CRD
20+
properties:
21+
apiVersion:
22+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
type: string
24+
kind:
25+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
26+
type: string
27+
metadata:
28+
type: object
29+
spec:
30+
properties:
31+
backup_dir:
32+
description: Backup directory name, set as a status found on the awxbackup object (backupDirectory)
33+
type: string
34+
backup_name:
35+
description: AWXBackup object name
36+
type: string
37+
backup_pvc:
38+
description: Name of the PVC to be restored from, set as a status found on the awxbackup object (backupClaim)
39+
type: string
40+
backup_pvc_namespace:
41+
description: (Deprecated) Namespace the PVC is in
42+
type: string
43+
backup_source:
44+
description: Backup source
45+
enum:
46+
- CR
47+
- PVC
48+
type: string
49+
deployment_name:
50+
description: Name of the restored deployment. This should be different from the original deployment name if the original deployment still exists.
51+
type: string
52+
no_log:
53+
default: true
54+
description: Configure no_log for no_log tasks
55+
type: boolean
56+
postgres_image:
57+
description: Registry path to the PostgreSQL container to use
58+
type: string
59+
postgres_image_version:
60+
description: PostgreSQL container image version to use
61+
type: string
62+
postgres_label_selector:
63+
description: Label selector used to identify postgres pod for backing up data
64+
type: string
65+
restore_resource_requirements:
66+
description: Resource requirements for the management pod that restores AWX from a backup
67+
properties:
68+
limits:
69+
properties:
70+
cpu:
71+
type: string
72+
memory:
73+
type: string
74+
type: object
75+
requests:
76+
properties:
77+
cpu:
78+
type: string
79+
memory:
80+
type: string
81+
type: object
82+
type: object
83+
set_self_labels:
84+
default: true
85+
description: Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)
86+
type: boolean
87+
type: object
88+
x-kubernetes-preserve-unknown-fields: true
89+
status:
90+
properties:
91+
conditions:
92+
description: The resulting conditions when a Service Telemetry is instantiated
93+
items:
94+
properties:
95+
lastTransitionTime:
96+
type: string
97+
reason:
98+
type: string
99+
status:
100+
type: string
101+
type:
102+
type: string
103+
type: object
104+
type: array
105+
restoreComplete:
106+
description: Restore process complete
107+
type: boolean
108+
type: object
109+
x-kubernetes-preserve-unknown-fields: true
110+
type: object
111+
served: true
112+
storage: true
113+
subresources:
114+
status: {}

0 commit comments

Comments
 (0)