Commit dfc7f987 authored by Bengt Giger's avatar Bengt Giger

Fixed YAML, caused yamllint error

parent 4ae17201
Pipeline #78588 passed with stage
in 13 seconds
stages:
- lint
lint-yaml:
stage: lint
image: sdesbure/yamllint
tags:
- k8s-runner
script:
- for file in $(find . -name "*.y*ml");
do yamllint $file;
done
extends: relaxed
rules:
line-length:
max: 120
level: warning
......@@ -13,9 +13,8 @@
kind: Namespace
metadata:
name: argocd
annotations:
annotations:
field.cattle.io/projectId: "{{ project_system.stdout }}"
- name: Install sealed-secrets encryption environment
command: kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.12.6/controller.yaml
......@@ -7,5 +7,3 @@
- name: Repository for kubectl
apt_repository:
repo: deb https://apt.kubernetes.io/ kubernetes-xenial main
......@@ -6,7 +6,7 @@
package:
name: kubectl
state: latest
- name: Create tarball cache directory
file:
path: "{{ k8s_tarball_cache }}"
......@@ -15,13 +15,13 @@
- name: Install Python libraries
pip:
name: openshift
# Install rancher CLI
- name: Determine rancher CLI latest version
shell: curl --silent "https://api.github.com/repos/rancher/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'
register: rancher_version
changed_when: false
- name: Get rancher CLI tarball
get_url:
url: "https://github.com/rancher/cli/releases/download/{{ rancher_version.stdout }}/rancher-linux-amd64-{{ rancher_version.stdout }}.tar.gz"
......@@ -35,24 +35,21 @@
tempfile:
state: directory
register: tmpdir
- name: Unarchive rancher CLI
unarchive:
src: "{{ k8s_tarball_cache }}/rancher-linux-amd64-{{ rancher_version.stdout }}.tar.gz"
dest: "{{ tmpdir.path }}"
remote_src: yes
- name: Copy rancher CLI
copy:
src: "{{ tmpdir.path }}/rancher-{{ rancher_version.stdout }}/rancher"
dest: "{{ k8s_install_basedir }}/rancher"
mode: 0755
- name: Remove temporary directory
file:
path: "{{ tmpdir.path }}"
state: absent
when: new_rancher.changed == True
# Install kubeseal
......@@ -60,13 +57,13 @@
shell: curl --silent "https://api.github.com/repos/bitnami-labs/sealed-secrets/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'
register: kubeseal_version
changed_when: false
- name: Install kubeseal
get_url:
url: "https://github.com/bitnami-labs/sealed-secrets/releases/download/{{ kubeseal_version.stdout }}/kubeseal-linux-amd64"
dest: "{{ k8s_install_basedir }}/kubeseal"
mode: 0755
- name: Set environment for kubeseal
copy:
dest: /etc/profile.d/kubeseal.sh
......@@ -80,7 +77,7 @@
shell: curl --silent "https://api.github.com/repos/argoproj/argo-cd/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'
register: argocd_version
changed_when: false
- name: Install argocd CLI
get_url:
url: "https://github.com/argoproj/argo-cd/releases/download/{{ argocd_version.stdout }}/argocd-linux-amd64"
......@@ -101,17 +98,14 @@
- name: Install kustomize
block:
- name: Unarchive kustomize
unarchive:
src: "{{ k8s_tarball_cache }}/kustomize_{{ kustomize_version.stdout }}_linux_amd64.tar.gz"
dest: "/tmp"
remote_src: yes
- name: Copy kustomize
copy:
src: "/tmp/kustomize"
dest: "{{ k8s_install_basedir }}/kustomize"
mode: 0755
when: new_kustomize.changed == True
......@@ -9,4 +9,3 @@
gpgkey:
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
......@@ -3,7 +3,7 @@
shell: "rancher project list | grep -e '{{ namespace.project }}' | cut -c 1-15"
register: project_id
changed_when: false
- name: "Assign namespace '{{ namespace.name }}' to project '{{ namespace.project }}"
community.kubernetes.k8s:
state: present
......@@ -13,5 +13,5 @@
kind: Namespace
metadata:
name: "{{ namespace.name }}"
annotations:
annotations:
field.cattle.io/projectId: "{{ project_id.stdout }}"
......@@ -7,4 +7,3 @@
- name: "Create '{{ project.name }}' project"
shell: "rancher project create --description '{{ project.description }}' {{ project.name }}"
when: project_name.stdout == ""
---
collections:
- name: community.kubernetes
......@@ -11,4 +11,3 @@
- op: replace
path: /spec/type
value: NodePort
......@@ -19,7 +19,7 @@ spec:
- backend:
serviceName: argocd-server
servicePort: 443
- host: argocd-cltst.let
http:
paths:
......@@ -31,4 +31,3 @@ spec:
- argocd-cltst.let.ethz.ch
- argocd-cltst.let
secretName: auto-cert-argocd
......@@ -30,4 +30,3 @@ data:
kind: ConfigMap
metadata:
name: argocd-rbac-cm
......@@ -19,4 +19,3 @@ patchesStrategicMerge:
# enable patch and ClusterIssuer in argocd-ingress.yml to use cert-manager certificate.
# Causes issues with argocd commandline tool
# - ./argocd-redirect-patch.yml
......@@ -15,4 +15,3 @@ spec:
targetRevision: HEAD
syncPolicy:
automated: {}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment