Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
Issue #24: Update Molecule test suite to 3.0 and fix YAML lint issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Feb 20, 2020
1 parent 34a45c0 commit 27b8ba9
Show file tree
Hide file tree
Showing 27 changed files with 522 additions and 522 deletions.
7 changes: 7 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
skip_list:
- '306'
- '602'
- '503'

exclude_paths:
- deploy/
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms

---
github: geerlingguy
patreon: geerlingguy
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services: docker
language: python

install:
- pip3 install docker molecule openshift jmespath
- pip3 install docker molecule yamllint ansible-lint openshift jmespath

script:
- molecule test -s test-local
7 changes: 7 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default
rules:
truthy: disable
line-length:
max: 160
level: warning
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ 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.1
operator-sdk build geerlingguy/tower-operator:0.2.3

Then push the generated image to Docker Hub:

Expand Down
2 changes: 1 addition & 1 deletion build/chain-operator-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
blockinfile:
path: "{{ operator_file_path }}"
block: "{{ item }}"
marker: "---"
marker: ""
marker_begin: ""
marker_end: ""
insertafter: "EOF"
Expand Down
1 change: 1 addition & 0 deletions deploy/crds/tower_v1alpha1_tower_cr_awx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: tower.ansible.com/v1alpha1
kind: Tower
metadata:
Expand Down
1 change: 1 addition & 0 deletions deploy/crds/tower_v1alpha1_tower_cr_tower.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: tower.ansible.com/v1alpha1
kind: Tower
metadata:
Expand Down
7 changes: 4 additions & 3 deletions deploy/crds/tower_v1alpha1_tower_crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand All @@ -14,6 +15,6 @@ spec:
status: {}
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
- name: v1alpha1
served: true
storage: true
19 changes: 9 additions & 10 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -16,21 +17,21 @@ spec:
containers:
- name: ansible
command:
- /usr/local/bin/ao-logs
- /tmp/ansible-operator/runner
- stdout
- /usr/local/bin/ao-logs
- /tmp/ansible-operator/runner
- stdout
image: "{{ operator_image }}"
imagePullPolicy: "{{ pull_policy|default('Always') }}"
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
name: runner
readOnly: true
- mountPath: /tmp/ansible-operator/runner
name: runner
readOnly: true
- name: operator
image: "{{ operator_image }}"
imagePullPolicy: "{{ pull_policy|default('Always') }}"
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
name: runner
- mountPath: /tmp/ansible-operator/runner
name: runner
env:
# Watch all namespaces (cluster-scoped).
- name: WATCH_NAMESPACE
Expand All @@ -41,8 +42,6 @@ spec:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: tower-operator
# - name: ANSIBLE_VERBOSITY
# value: '3'
volumes:
- name: runner
emptyDir: {}
117 changes: 59 additions & 58 deletions deploy/role.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: tower-operator
rules:
- apiGroups:
- ""
resources:
- pods
- services
- services/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- apps
- extensions
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
- ingresses
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- tower-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- apiGroups:
- tower.ansible.com
resources:
- '*'
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
- services
- services/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- apps
- extensions
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
- ingresses
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- tower-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- apiGroups:
- tower.ansible.com
resources:
- '*'
verbs:
- '*'
7 changes: 4 additions & 3 deletions deploy/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: tower-operator
subjects:
- kind: ServiceAccount
name: tower-operator
namespace: default
- kind: ServiceAccount
name: tower-operator
namespace: default
roleRef:
kind: ClusterRole
name: tower-operator
Expand Down
1 change: 1 addition & 0 deletions deploy/service_account.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
Loading

0 comments on commit 27b8ba9

Please sign in to comment.