Fix typo;Fix module;Register workloadcluster in argocd #2;Reduce tty refresh frequency;Upgrade component
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d1b1635942
commit
336150b00c
@ -111,7 +111,7 @@
|
||||
register: capi_kubeconfig
|
||||
|
||||
- name: Retrieve kubeconfig
|
||||
ansible.builtin.command:
|
||||
ansible.builtin.shell:
|
||||
cmd: >-
|
||||
clusterctl get kubeconfig \
|
||||
{{ vapp['workloadcluster.name'] | lower }} \
|
||||
|
@ -4,7 +4,13 @@
|
||||
kubernetes.core.k8s:
|
||||
template: serviceaccount.j2
|
||||
state: present
|
||||
kubeconfig: "{{ capi_kubeconfig.path }}"
|
||||
vars:
|
||||
_template:
|
||||
account:
|
||||
name: argocd-sa
|
||||
namespace: default
|
||||
clusterrolebinding:
|
||||
name: argocd-crb
|
||||
|
||||
- name: Retrieve service account bearer token
|
||||
kubernetes.core.k8s_info:
|
||||
@ -20,16 +26,19 @@
|
||||
namespace: "{{ _template.account.namespace }}"
|
||||
register: workloadcluster_bearertoken
|
||||
|
||||
- debug:
|
||||
msg: "{{ workloadcluster_bearertoken.resources | json_query('[].data.token') }}"
|
||||
- name: Register workload cluster in argo-cd
|
||||
kubernetes.core.k8s:
|
||||
template: cluster.j2
|
||||
state: present
|
||||
kubeconfig: "{{ kubeconfig.path }}"
|
||||
vars:
|
||||
_template:
|
||||
cluster:
|
||||
name: "{{ vapp['workloadcluster.name'] | lower }}"
|
||||
secret: argocd-cluster-{{ vapp['workloadcluster.name'] | lower }}
|
||||
url: https://{{ vapp['workloadcluster.vip'] }}:6443
|
||||
token: "{{ workloadcluster_bearertoken.resources | json_query('[].data.token') }}"
|
||||
|
||||
vars:
|
||||
_template:
|
||||
account:
|
||||
name: argocd-sa
|
||||
namespace: default
|
||||
clusterrolebinding:
|
||||
name: argocd-crb
|
||||
module_defaults:
|
||||
group/k8s:
|
||||
kubeconfig: "{{ capi_kubeconfig.path }}"
|
||||
|
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ _template.cluster.secret }}
|
||||
namespace: argo-cd
|
||||
labels:
|
||||
argocd.argoproj.io/secret-type: cluster
|
||||
type: Opaque
|
||||
stringData:
|
||||
name: {{ _template.cluster.name }}
|
||||
server: {{ _template.cluster.url }}
|
||||
config: |
|
||||
{
|
||||
"bearerToken": "{{ _template.cluster.token }}",
|
||||
"tlsClientConfig": {
|
||||
"insecure": true
|
||||
}
|
||||
}
|
@ -17,10 +17,10 @@ COMPONENTS=('ca' 'storage' 'registry' 'git' 'gitops')
|
||||
FQDN='{{ vapp['metacluster.fqdn'] }}'
|
||||
IPADDRESS='{{ vapp['guestinfo.ipaddress'] }}'
|
||||
|
||||
I=10
|
||||
I=60
|
||||
|
||||
while /bin/true; do
|
||||
if [[ $I -lt 9 ]]; then
|
||||
if [[ $I -gt 59 ]]; then
|
||||
clear > /dev/tty1
|
||||
I=0
|
||||
else
|
||||
|
@ -79,7 +79,7 @@ components:
|
||||
management:
|
||||
version:
|
||||
# Must match the version referenced at `dependencies.static_binaries[.filename==clusterctl].url`
|
||||
base: v1.3.1
|
||||
base: v1.3.2
|
||||
# Must match the version referenced at `components.cert-manager.helm.version`
|
||||
cert_manager: v1.10.1
|
||||
infrastructure_vsphere: v1.5.1
|
||||
@ -215,7 +215,7 @@ dependencies:
|
||||
|
||||
static_binaries:
|
||||
- filename: clusterctl
|
||||
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.1/clusterctl-linux-amd64
|
||||
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.2/clusterctl-linux-amd64
|
||||
- filename: govc
|
||||
url: https://github.com/vmware/govmomi/releases/download/v0.29.0/govc_Linux_x86_64.tar.gz
|
||||
archive: compressed
|
||||
|
Loading…
Reference in New Issue
Block a user