Skip to content
This repository was archived by the owner on Apr 23, 2023. It is now read-only.

fixed role and non-existing-kind#14

Open
VedantMahabaleshwarkar wants to merge 1 commit intoapache:masterfrom
VedantMahabaleshwarkar:bug/fix-kind-and-role
Open

fixed role and non-existing-kind#14
VedantMahabaleshwarkar wants to merge 1 commit intoapache:masterfrom
VedantMahabaleshwarkar:bug/fix-kind-and-role

Conversation

@VedantMahabaleshwarkar
Copy link
Copy Markdown

This is a PR related to the issue mentioned here : #13

Comment thread config/manager/kustomization.yaml Outdated
kind: Kustomization
images:
- name: controller
newName: quay.io/vedantm/airflow-operator
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaxil - This would benefit from a recommended docker registry for hosting airflow related docker images.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes this shouldn't be in the PR, my bad.

// +kubebuilder:rbac:groups=storage.k8s.io,resources=storageclasses,verbs=get;list;watch;create;update;patch;delete

// +kubebuilder:rbac:groups=airflow.apache.org,resources=airflowclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=airflow.apache.org,resources=airflowclusters;airflowclusters/finalizers,verbs=get;list;watch;create;update;patch;delete
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this finalizers subresource ? Is that a standard one ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is standard for OpenShift, so that it is able to add ownerReferences to the owned resources. It will do no harm when deployed on Kubernetes

Comment thread config/rbac/role.yaml
rules:
- resources:
- apiGroups:
- ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes things for Openshift clusters. Kubernetes allows an empty apiGroups field but Openshift does not. Figured that adding it wouldn't hurt because everything will work on Kubernetes just the same even after the change.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, basically validation fails on OpenShift because it uses a bit tighter model

Comment thread Dockerfile
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY templates/ templates/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this suffice ? I saw permission denied

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VedantMahabaleshwarkar can you confirm?

I believe this is it, it worked for us...where did you see permission denied?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see permission denied anywhere. Before the change the Custom Resource had the error Missing templates/*, no such file or directory and adding this line fixed the error.

@turbaszek turbaszek added the kind: bug Something isn't working label Mar 22, 2020
@turbaszek
Copy link
Copy Markdown
Member

@VedantMahabaleshwarkar could you please rebase onto actual master? We've introduced some static code checks:
https://github.com/apache/airflow-on-k8s-operator/blob/master/docs/development.md#static-checks

@VedantMahabaleshwarkar
Copy link
Copy Markdown
Author

@VedantMahabaleshwarkar could you please rebase onto actual master? We've introduced some static code checks:
https://github.com/apache/airflow-on-k8s-operator/blob/master/docs/development.md#static-checks

@turbaszek I have rebased my PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

kind: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants