Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pip installation with APT for python-openshift #114

Merged
merged 2 commits into from
Mar 6, 2021
Merged
Changes from 1 commit
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
18 changes: 14 additions & 4 deletions ansible/roles/common/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,20 @@
retries: 5
until: apt_install_common is success

- name: install common Kubernetes ansible module
pip:
name:
- openshift
- name: 'add apt key for openshift kubernetes module (1/3)'
ansible.builtin.apt_key:
keyserver: keyserver.ubuntu.com
id: ADF016E51783213C8A8C831A1348C52605DB2FE6

- name: 'add OBS repo for openshift kubernetes module (2/3)'
ansible.builtin.apt_repository:
repo: deb http://download.opensuse.org/repositories/home:/anthr76:/kubernetes/Ubuntu_20.04/ /
state: present

- name: 'install openshift kubernetes module (3/3)'
apt:
name: python-openshift
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we use this anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do in Cilium.

community.kubernetes.helm_repository:
name: cilium
repo_url: "https://helm.cilium.io/"
- name: deploy Cilium
community.kubernetes.helm:
name: cilium
chart_ref: cilium/cilium
release_namespace: kube-system
chart_version: "{{ cni_cilium_helm_version }}"
values: "{{ lookup('template', 'values.yaml.j2') | from_yaml }}"
- name: patch cilium-operator for helm chart bug
community.kubernetes.k8s:
state: present
definition:
apiVersion: apps/v1
kind: Deployment
metadata:
name: cilium-operator
namespace: kube-system
spec:
template:
spec:
containers:
- name: cilium-operator
image: cilium/operator-dev:{{ cni_cilium_image_version }}
- name: Apply kube-router manifests
community.kubernetes.k8s:

Likely elsewhere if the community is in agreeance, and sees fit for other CNI deployments etc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit: 0c527dc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is purely in usage for the CNI should we keep it here or move it to the respective role?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. If we slot in CNI role we'll have to do distro based checks. The equivalent to this for Arch is also in common. In my opinion it would make sense here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to add on to this tidbit. If we were to move forward with issues like this it would make more sense to keep this in common.

update_cache: yes

- name: install and configure log2ram
include_tasks: log2ram.yml
Expand Down