forked from theforeman/foreman
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to use newly released Ansible 2.6 k8s module (theforeman#767)
* workaround ansible/ansible#40185 * Create rolebinding with Ansible module * remove unnecessary oc command * explicitly define project with annotations * _exec -> exec * {openshift|k8s}_raw -> k8s * Update required ansible version * use oc command until ansible/ansible#42116 is fixed
- Loading branch information
Showing
13 changed files
with
99 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,6 @@ spec: | |
name: certs | ||
lifecycle: | ||
postStart: | ||
_exec: | ||
exec: | ||
command: | ||
- "/usr/bin/save-container-environment" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
--- | ||
- name: project foreman | ||
openshift_raw: | ||
name: "{{ project_name }}" | ||
display_name: Foreman | ||
description: Foreman stack | ||
state: present | ||
kind: Project | ||
- name: project foreman (workaround for https://github.com/ansible/ansible/issues/42116) | ||
shell: oc new-project '{{ project_name }}' --description="Foreman Stack" --display-name="Foreman" || oc get project '{{ project_name }}' | ||
# k8s: | ||
# state: present | ||
# definition: | ||
# apiVersion: project.openshift.io/v1 | ||
# kind: Project | ||
# metadata: | ||
# name: "{{ project_name }}" | ||
# annotations: | ||
# openshift.io/display-name: Foreman | ||
# openshift.io/description: Foreman stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,74 @@ | ||
--- | ||
- name: pulp persistent volume claim | ||
k8s_raw: | ||
k8s: | ||
state: "{{ deployment_state }}" | ||
definition: "{{ lookup('template', 'templates/' + item + '.pvc.yaml') | from_yaml }}" | ||
with_items: | ||
- pulp-data | ||
- puppet-data | ||
|
||
- name: pulp service | ||
k8s_raw: | ||
k8s: | ||
state: "{{ deployment_state }}" | ||
definition: "{{ lookup('template', 'templates/' + item + '.service.yaml') | from_yaml }}" | ||
with_items: | ||
- pulp | ||
- content-server | ||
|
||
- name: pulp deployment | ||
openshift_raw: | ||
k8s: | ||
state: "{{ deployment_state }}" | ||
definition: "{{ lookup('template', 'templates/' + item + '.deployment.yaml') | from_yaml }}" | ||
with_items: | ||
- pulp | ||
- pulp-worker | ||
- pulp-celerybeat | ||
- pulp-resource-manager | ||
- pulp-streamer | ||
- squid | ||
- content-server | ||
|
||
- name: Create pulp deployment (workaround for https://github.com/ansible/ansible/issues/40185) | ||
k8s: | ||
state: "{{ deployment_state }}" | ||
definition: | ||
apiVersion: v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
name: pulp-worker | ||
namespace: "{{ project_name }}" | ||
labels: | ||
app: foreman | ||
service: pulp-worker | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: foreman | ||
service: pulp-worker | ||
spec: | ||
serviceAccount: anyuid | ||
serviceAccountName: anyuid | ||
containers: | ||
- name: pulp-worker | ||
securityContext: {} | ||
state: present | ||
volumeMounts: | ||
- readOnly: false | ||
mountPath: /var/lib/pulp | ||
name: pulp-data | ||
- readOnly: false | ||
mountPath: /etc/puppet | ||
name: puppet-data | ||
image: "{{ registry }}/pulp-worker:latest" | ||
volumes: | ||
- name: pulp-data | ||
persistentVolumeClaim: | ||
claimName: pulp-data | ||
- name: puppet-data | ||
persistentVolumeClaim: | ||
claimName: puppet-data | ||
replicas: "{{ pulp_worker_count }}" | ||
strategy: | ||
type: Rolling | ||
rollingParams: | ||
timeoutSeconds: 900 |
42 changes: 0 additions & 42 deletions
42
containers/deploy/pulp/templates/pulp-worker.deployment.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters