awx-operator icon indicating copy to clipboard operation
awx-operator copied to clipboard

Deployment of awx crd via kustomize with this repo

Open Syntax3rror404 opened this issue 3 years ago • 6 comments

ISSUE TYPE
  • Bug Report
SUMMARY

We use argo to deploy the awx-operator via the kustomize located at /config/default/kustomization.yaml

This works just fine. The Problem is how I can deploy the crd for the awx instance over kustomize. I found the file config/crd/kustomization.yaml but it looks like this is not intended to be run by itself.

So we need our own repo with the crd which is always changing with all newer versions.

How is it possible to deploy the crd with your repo? If this doesn't work, can you still incorporate that? That shouldn't be too time-consuming. It is a part that belongs to the operator.

Syntax3rror404 avatar Nov 23 '21 13:11 Syntax3rror404

I was trying to avoid the use of "make deploy" and I finaly give a try to argocd. With a simple configuration :

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: awx
spec:
  destination:
    name: in-cluster
    namespace: awx
    server: ''
  source:
    path: config/default
    repoURL: 'https://github.com/ansible/awx-operator.git'
    targetRevision: 0.15.0
  project: default
  syncPolicy:
    syncOptions:
      - CreateNamespace=true

The operator is running all crds well deployed. Maybe I mistunderstood your problem, but it seems to work out the way you wanted.

Skaopap avatar Dec 21 '21 15:12 Skaopap

Right thats the same code i also have to deploy the operator. But after that i need a second application with the awx crds with custom values like ingress, postgress values .... The problem is not to deploy the operator, the awx crd is the problem.

Syntax3rror404 avatar Dec 21 '21 15:12 Syntax3rror404

@Syntax3rror404 As I find my self in the step to manage awx with argocd, I am curious to understand better your need, can you please elaborate?

mihai-satmarean avatar Apr 26 '22 10:04 mihai-satmarean

OK, you need to run awx a awx-operator. This is possible without creating new repos and sync them. But this only deploys a awx-operator without awx. So you need to push a crd to create a awx. For this use-case you need to create your own repo and sync them. Because the crd is missing in this repo.

logically this should be written with kustomize like the other resources To install awx you need this in your own repo:

---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: awx
  namespace: argocd
#   finalizers:
#   - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    namespace: awx
    server: {{ .Values.spec.destination.server }}
  project: default
  source:
    helm:
      valueFiles:
        - values/awx.yaml
    path: '.'
    repoURL: {{ .Values.spec.awx.source.repoURL }}
    targetRevision: {{ .Values.spec.awx.source.targetRevision }}
  syncPolicy:
    automated:
      prune: false
      selfHeal: true
      allowEmpty: true
    syncOptions:
    - CreateNamespace=true

Syntax3rror404 avatar Sep 03 '22 11:09 Syntax3rror404

Hello, is anyone still there? awx-operator runs fine but we also need to deploy the awx cr to get a awx working. With this repo we only get a awx-operator with argo but not a awx for this we need to create a own repo which holds this custom resource with the values. A kustomize file in this repo will be fine for that.

Syntax3rror404 avatar Nov 06 '22 12:11 Syntax3rror404

Hello i have the same issue. Has anyone found a way to actually make the deployment work? this is my ArgoCD project

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: awx-operator
spec:
  destination:
    name: ''
    namespace: awx
    server: 'https://kubernetes.default.svc'
  source:
    path: awx
    repoURL: 'https://github.com/xxxxx/deployments.git'
    targetRevision: HEAD
  sources: []
  project: kubecluster
  syncPolicy:
    automated:
      prune: false
      selfHeal: false
    syncOptions:
      - CreateNamespace=true

This the actual kustomization file

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  # Find the latest tag here: https://github.com/ansible/awx-operator/releases
  - github.com/ansible/awx-operator/config/default?ref=2.7.0
  - awx-deployment.yaml

# Set the image tags to match the git version from above
images:
  - name: quay.io/ansible/awx-operator
    newTag: 2.7.0

# Specify a custom namespace in which to install AWX
namespace: awx

this is the deployment

apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx-deployment
spec:
  service_type: LoadBalancer
  admin_user: 
  admin_email: 
  admin_password_secret: awx-admin-password
  postgres_configuration_secret: postgres-awx-secret
  loadbalancer_protocol: https
  loadbalancer_port: 443
  loadbalancer_ip: '10.10.10.163'

But nothing happens

image

ilbarone87 avatar Oct 21 '23 16:10 ilbarone87