Skip to content

Commit

Permalink
Yaml lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jharmison-redhat committed Feb 16, 2021
1 parent d9a7bd6 commit fbaa10c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 37 deletions.
48 changes: 24 additions & 24 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ spec:
control-plane: controller-manager
spec:
containers:
- name: manager
args:
- "--enable-leader-election"
- "--leader-election-id=gitea-operator"
image: controller:latest
env:
- name: ANSIBLE_GATHERING
value: explicit
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
livenessProbe:
httpGet:
path: /readyz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
- name: manager
args:
- "--enable-leader-election"
- "--leader-election-id=gitea-operator"
image: controller:latest
env:
- name: ANSIBLE_GATHERING
value: explicit
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
livenessProbe:
httpGet:
path: /readyz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
terminationGracePeriodSeconds: 10
serviceAccountName: gitea-operator-sa
5 changes: 4 additions & 1 deletion molecule/kind-cluster/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
gather_facts: false
tasks:
- name: Install nginx Ingress onto kind
command: helm install kind-ingress stable/nginx-ingress --set controller.service.type=NodePort --set controller.service.nodePorts.http=30080
command: >
helm install kind-ingress stable/nginx-ingress
--set controller.service.type=NodePort
--set controller.service.nodePorts.http=30080
28 changes: 17 additions & 11 deletions roles/gitea-ocp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
kind: Pod
namespace: '{{ _gitea_namespace }}'
label_selectors:
- "app={{ _gitea_name }}"
- "app={{ _gitea_name }}"
register: gitea_pod

- set_fact:
Expand All @@ -100,16 +100,22 @@

- name: Generate administrator password
block:
- set_fact:
gitea_admin_password: "{{ lookup('password', '/dev/null length=15 chars=ascii_letters') }}"
- set_fact:
gitea_admin_password: "{{ lookup('password', '/dev/null length=15 chars=ascii_letters') }}"

- name: Create gitea-admin-credentials Secret
k8s:
definition: "{{ lookup('template', 'secret.yml.j2') | from_yaml }}"
- name: Create gitea-admin-credentials Secret
k8s:
definition: "{{ lookup('template', 'secret.yml.j2') | from_yaml }}"

- name: Create Gitea admin user
community.kubernetes.k8s_exec:
namespace: "{{ _gitea_namespace }}"
pod: '{{ gitea_pod_name }}'
command: /home/gitea/gitea --config=/home/gitea/conf/app.ini admin create-user --username '{{ _gitea_admin_user }}' --password '{{ gitea_admin_password }}' --admin --email '{{ _gitea_admin_email }}' --access-token --must-change-password=false
- name: Create Gitea admin user
community.kubernetes.k8s_exec:
namespace: "{{ _gitea_namespace }}"
pod: '{{ gitea_pod_name }}'
command: >
/home/gitea/gitea --config=/home/gitea/conf/app.ini
admin create-user --admin --access-token
--username '{{ _gitea_admin_user }}'
--password '{{ gitea_admin_password }}'
--email '{{ _gitea_admin_email }}'
--must-change-password=false
when: not gitea_admin_credentials.resources
8 changes: 7 additions & 1 deletion roles/gitea-ocp/tasks/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@
community.kubernetes.k8s_exec:
namespace: "{{ _gitea_namespace }}"
pod: '{{ gitea_pod_name }}'
command: /home/gitea/gitea --config=/home/gitea/conf/app.ini admin create-user --username '{{ _giteauser.username }}' --password '{{ _giteauser.password }}' --email '{{ _giteauser.email }}' --access-token --must-change-password=false
command: >
/home/gitea/gitea --config=/home/gitea/conf/app.ini
admin create-user --access-token
--username '{{ _giteauser.username }}'
--password '{{ _giteauser.password }}'
--email '{{ _giteauser.email }}'
--must-change-password=false

0 comments on commit fbaa10c

Please sign in to comment.