Skip to content

Ability to apply a remote directory. #150

@etsauer

Description

@etsauer

Not sure exactly how we accomplish this one, but here's the use case.

I am often in the situation of wanting to deploy an Operator from a remote git repository. This repo likely does not use applier, and likely has a deploy/ directory containing multiple manifests files required to deploy it.

For example:

[esauer 🎩︎namespace-configuration-operator] (master)$ ls -l deploy/
total 20
drwxrwxr-x. 2 esauer esauer 4096 Aug 26 17:11 crds
-rw-rw-r--. 1 esauer esauer  918 Aug 26 17:11 operator.yaml
-rw-rw-r--. 1 esauer esauer  617 Aug 26 17:11 role_binding.yaml
-rw-rw-r--. 1 esauer esauer  866 Aug 26 17:11 role.yaml
-rw-rw-r--. 1 esauer esauer   87 Aug 26 17:11 service_account.yaml

In order to deploy this using applier, I have to add all of this to my seed-hosts.yml:

  - name: Namespace Config Operator CRD
    file: https://raw.githubusercontent.com/redhat-cop/namespace-configuration-operator/v0.0.1/deploy/crds/redhatcop_v1alpha1_namespaceconfig_crd.yaml
    namespace: namespace-configuration-operator
    tags:
    - project-config
  - name: Namespace Config Operator Role
    file: https://raw.githubusercontent.com/redhat-cop/namespace-configuration-operator/v0.0.1/deploy/role.yaml
    namespace: namespace-configuration-operator
    tags:
    - project-config
  - name: Namespace Config Operator Role Binding
    file: https://raw.githubusercontent.com/redhat-cop/namespace-configuration-operator/v0.0.1/deploy/role_binding.yaml
    namespace: namespace-configuration-operator
    tags:
    - project-config
  - name: Namespace Config Operator Service Account
    file: https://raw.githubusercontent.com/redhat-cop/namespace-configuration-operator/v0.0.1/deploy/service_account.yaml
    namespace: namespace-configuration-operator
    tags:
    - project-config
  - name: Namespace Config Operator Deployment
    file: https://github.com/redhat-cop/namespace-configuration-operator/blob/v0.0.1/deploy/operator.yaml
    namespace: namespace-configuration-operator
    tags:
    - project-config

This gets very verbose, especially when setting up an entire cluster where I am deploying multiple operators. It would be nice to have a more succinct way of doing this. One possibly way would be to find a syntax that would cause applier to clone the directory mentioned and oc apply -f repository/deploy/ it instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions