apiVersion: kubernetes.crossplane.io/v1alpha2
kind: Object
metadata:
  name: emissary-crds
  namespace: crossplane-system
spec:
  providerConfigRef:
    name: kubernetes-provider
  forProvider:
    manifest:
      apiVersion: batch/v1
      kind: Job
      metadata:
        name: emissary-crds-installer
        namespace: emissary
      spec:
        template:
          metadata:
            annotations:
              sidecar.istio.io/inject: "false"
          spec:
            serviceAccountName: emissary-crds-installer
            containers:
            - name: kubectl
              image: bitnami/kubectl:latest
              command:
              - kubectl
              - apply
              - -f
              - https://app.getambassador.io/yaml/emissary/3.8.0/emissary-crds.yaml
            restartPolicy: OnFailure
