mirror of https://github.com/fluxcd/flux2.git
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			29 lines
		
	
	
		
			765 B
		
	
	
	
		
			YAML
		
	
			
		
		
	
	
			29 lines
		
	
	
		
			765 B
		
	
	
	
		
			YAML
		
	
---
 | 
						|
apiVersion: apps/v1
 | 
						|
kind: Deployment
 | 
						|
metadata:
 | 
						|
  name: credentials-sync
 | 
						|
  namespace: flux-system
 | 
						|
spec:
 | 
						|
  template:
 | 
						|
    spec:
 | 
						|
      containers:
 | 
						|
      - name: sync
 | 
						|
        image: aws/aws-cli
 | 
						|
        env:
 | 
						|
        - name: RECONCILE_SH
 | 
						|
          value: |-
 | 
						|
            reconcile() {
 | 
						|
              echo "Starting GCR token sync -- $(date)"
 | 
						|
              echo "Logging into ECR: ${ECR_REGION} -- ${ECR_REGISTRY}"
 | 
						|
              token="$(gcloud auth print-access-token)"
 | 
						|
              user="oauth2accesstoken "
 | 
						|
              server="${GCR_REGISTRY}"
 | 
						|
 | 
						|
              echo "Creating secret: ${KUBE_SECRET}"
 | 
						|
              apply-secret "${KUBE_SECRET}" "${token}" "${user}" "${server}"
 | 
						|
 | 
						|
              echo "Finished GCR token sync -- $(date)"
 | 
						|
              echo
 | 
						|
            }            
 |