Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: DENA-828 - bases for k6-operator #356

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

fillyD
Copy link
Contributor

@fillyD fillyD commented Aug 8, 2024

No description provided.

Copy link

linear bot commented Aug 8, 2024

kind: Kustomization
resources:
- upstream/k6.yaml
- upstream/plz.yaml
Copy link
Member

Choose a reason for hiding this comment

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

plz is not a well known acronym, I'd keep the full name of the resource

APP_VERSION=0.0.16


.PHONY: get-upstream
Copy link
Member

Choose a reason for hiding this comment

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

In this repo, we usually call upstream to the files/manifests that we pull unchanged, so I don't like calling it upstream here, since the produced manifests have already been templated by our values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what would be the preference? gen-manifests or something similar?

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: k6-operator-manager-role
Copy link
Member

Choose a reason for hiding this comment

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

this is quite a powerful role, including reading all secrets, and full control over all the cluster deployments. Ideally we'll have this be a "role" instead of a "clusterrole" and bind it to opt-in namespaces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the ClusterRole that comes out-of-the-box. is the suggestion to move this to the controller package and transform to role and for now deploy to dev-enablement?

are there attributes between ClusterRole and Role transferable? wondering if it is a matter of just location and replacing values for kind and adding .metadata.namespace

Copy link
Member

Choose a reason for hiding this comment

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

yes to everything xD. I think they should be pretty transferable, iirc the only difference is that clusterrole affects to the whole cluster, while the role only affects the namespace where it's deployed. However sometimes the software verifies that it has superpowers and refuses to run if it doesn't, so it may not work

Copy link
Contributor Author

@fillyD fillyD Aug 9, 2024

Choose a reason for hiding this comment

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

For testing behind firewalls we will need this applied and a template deployed wherever we want access to.

instructions are as following

  1. generate a k6 token via grafana cloud and create a k8s secret

kubectl create secret generic grafana-k6-token -n plz-ns --from-literal=token=<GRAFANA_API_STACK_TOKEN>

  1. create a PLZ resource definition and apply it in your desired cluster. I am not sure if it needs to be namespace-bound, I guess it depends on the access controls of the system under test

apiVersion: k6.io/v1alpha1
kind: PrivateLoadZone
metadata:
name: my-first-plz
namespace: plz-ns
spec:
token: grafana-k6-token
resources:
limits:
cpu: 256m
memory: 1024Mi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants