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

[Proposal] Ingestion Spec controller #3

Closed
AdheipSingh opened this issue Feb 21, 2023 · 7 comments · Fixed by #53
Closed

[Proposal] Ingestion Spec controller #3

AdheipSingh opened this issue Feb 21, 2023 · 7 comments · Fixed by #53
Labels
enhancement New feature or request

Comments

@AdheipSingh
Copy link
Contributor

@styk-tv
Copy link

styk-tv commented Mar 2, 2023

@AdheipSingh this would be a massive step forward and probably one of the most fundamental improvements in the operator. Configuration of kafka sources is fundamental to control of data plane using helm charts. I'd be happy to help with testing.

@AdheipSingh
Copy link
Contributor Author

@styk-tv I will be sending a draft PR. Your reviews and testing would be really helpful.
Thank you for collaboration.

@styk-tv
Copy link

styk-tv commented Mar 3, 2023

@AdheipSingh this is great news, thank you for your fast reply. waiting for the PR whenever you're ready, please ping here

@itamar-marom
Copy link
Collaborator

itamar-marom commented Mar 21, 2023

Regarding the field: supervisorSpec

Instead of spiling an entire JSON, a more common way is to do a reference to a configmap. or secret For example:

apiVersion: "druid.apache.org/v1alpha1"
kind: "DruidIngestion"
metadata:
  name: sample-druid-spec
  namespace: mydruid
spec:
  clusterRef: mydruid
  suspend: false
  supervisorSpecRef:
     kind: ConfigMap
     name: mysupervisor
     namespace: druid

and hold an object like this:

type CrossNamespaceSourceReference struct {
	// API version of the referent.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent.
	// +required
	Kind string `json:"kind"`

	// Name of the referent.
	// +required
	Name string `json:"name"`

	// Namespace of the referent, defaults to the namespace of the Kubernetes resource object that contains the reference.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

It makes the YAMLs much cleaner.

@AdheipSingh
Copy link
Contributor Author

Instead of spiling an entire JSON, a more common way is to do a reference to a configmap. or secret For example:

  • In that case, user needs to do a manual lookup to a configmap, and the operator will need to reconcile cm changes as well as CR ( which seems like not so friendly pattern ) , also it will require to apply a configmap and then apply the CR.
  • CR should hold the truth of what an ingestion spec represents. I know its a long spec, but thats what the current CR also does for all the configs be it log4j, dimensions.json etc

@itamar-marom
Copy link
Collaborator

Your points are valid.

I know that Prometheus for example has an interesting configuration reload mechanism.

There is a sidecar container that watches the configmaps and when one of them changes, it sends a request to Prometheus API (route /-/reload) and it reloads the configuration from the configmap.

I'm still not familiar enough with Druid but I wonder if there is a better way to do it.

Regarding the users, Adding another configmap.yaml next to their Druid.yaml - I think they will prefer that instead of this big Spec. Maybe worth asking them.

@AdheipSingh AdheipSingh mentioned this issue May 6, 2023
9 tasks
@itamar-marom
Copy link
Collaborator

@AdheipSingh We also need a secure solution for providing authentication information.
For example, in hadoop_indexing we can provide s3 authentication:

"tuningConfig" : {
      "type": "hadoop",
      "jobProperties": {
        "fs.s3a.impl" : "org.apache.hadoop.fs.s3a.S3AFileSystem",
        "fs.AbstractFileSystem.s3a.impl" : "org.apache.hadoop.fs.s3a.S3A",
        "mapreduce.job.classloader": "true",
        "fs.s3a.aws.credentials.provider": "org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider",
        "fs.s3a.access.key": "${AWS_ACCESS_KEY}",
        "fs.s3a.secret.key": "${AWS_SECRET_KEY}",
        "fs.s3a.session.token": "${AWS_SESSION_TOKEN}"
      }
    }

@itamar-marom itamar-marom added the enhancement New feature or request label Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants