Skip to content

Commit

Permalink
Merge branch 'master' into add-entry-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingParsley authored Oct 29, 2022
2 parents 8043209 + 480ccb5 commit 240814b
Show file tree
Hide file tree
Showing 28 changed files with 2,021 additions and 202 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace

Expand Down
46 changes: 45 additions & 1 deletion apis/druid/v1alpha1/druid_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,44 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// AdditionalContainer defines the additional sidecar container
type AdditionalContainer struct {
// List of configurations to use which are not present or to override default implementation configurations

// This is the image for the additional container to run.
// This is a required field
Image string `json:"image"`

// This is the name of the additional container.
// This is a required field
ContainerName string `json:"containerName"`

// This is the command for the additional container to run.
// This is a required field
Command []string `json:"command"`

// Optional: If not present, will be taken from top level spec
ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`

// Optional: Argument to call the command
Args []string `json:"args,omitempty"`

// Optional: ContainerSecurityContext. If not present, will be taken from top level pod
ContainerSecurityContext *v1.SecurityContext `json:"securityContext,omitempty"`

// Optional: CPU/Memory Resources
Resources v1.ResourceRequirements `json:"resources,omitempty"`

// Optional: volumes etc for the Druid pods
VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`

// Optional: environment variables for the Additional Container
Env []v1.EnvVar `json:"env,omitempty"`

// Optional: Extra environment variables
EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"`
}

// DruidSpec defines the desired state of Druid
type DruidSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Expand Down Expand Up @@ -117,7 +155,7 @@ type DruidSpec struct {
ReadinessProbe *v1.Probe `json:"readinessProbe,omitempty"`

// Optional: StartupProbe for nodeSpec
StartUpProbes *v1.Probe `json:"startUpProbes,omitempty"`
StartUpProbe *v1.Probe `json:"startUpProbe,omitempty"`

// Optional: k8s service resources to be created for each Druid statefulsets
Services []v1.Service `json:"services,omitempty"`
Expand All @@ -139,6 +177,9 @@ type DruidSpec struct {
// that is, it must match regex '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
Nodes map[string]DruidNodeSpec `json:"nodes"`

// Operator deploys the sidecar container based on these properties. Sidecar will be deployed for all the Druid pods.
AdditionalContainer []AdditionalContainer `json:"additionalContainer,omitempty"`

// Operator deploys above list of nodes in the Druid prescribed order of Historical, Overlord, MiddleManager,
// Broker, Coordinator etc.
// Optional: If set to true then operator checks the rollout status of previous version StateSets before updating next.
Expand Down Expand Up @@ -200,6 +241,9 @@ type DruidNodeSpec struct {
// Optional: affinity to be used to for enabling node, pod affinity and anti-affinity
Affinity *v1.Affinity `json:"affinity,omitempty"`

// Optional: node selector to be used by Druid statefulsets
NodeSelector map[string]string `json:"nodeSelector,omitempty"`

// Optional: terminationGracePeriod
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`

Expand Down
70 changes: 68 additions & 2 deletions apis/druid/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 0.1.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.0.7
appVersion: 0.0.9
# icon
icon: "https://www.apache.org/logos/res/druid/druid-1.png"
Loading

0 comments on commit 240814b

Please sign in to comment.