Skip to content

Commit

Permalink
Point repos to github and adds pullPolicy (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
digiserg authored Dec 13, 2024
1 parent 7c51f90 commit 39e3985
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 4 deletions.
4 changes: 4 additions & 0 deletions api/v1beta1/axonopscassandra_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type AxonOpsCassandraCluster struct {
Labels map[string]string `json:"labels,omitempty"`
Env []EnvVars `json:"env,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
PullPolicy string `json:"pullPolicy,omitempty"`
}

// AxonOpsDashboard defines the dashboard
Expand All @@ -82,6 +83,7 @@ type AxonOpsDashboard struct {
Labels map[string]string `json:"labels,omitempty"`
Env []EnvVars `json:"env,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
PullPolicy string `json:"pullPolicy,omitempty"`
}

// AxonOpsServer defines the dashboard
Expand All @@ -92,6 +94,7 @@ type AxonOpsServer struct {
Labels map[string]string `json:"labels,omitempty"`
Env []EnvVars `json:"env,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
PullPolicy string `json:"pullPolicy,omitempty"`
}

// AxonOpsServer defines the dashboard
Expand All @@ -103,6 +106,7 @@ type Elasticsearch struct {
ClusterName string `json:"clusterName,omitempty"`
Env []EnvVars `json:"env,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
PullPolicy string `json:"pullPolicy,omitempty"`
}

// AxonOpsCassandraCluster defines the Apache Cassandra cluster to install
Expand Down
7 changes: 5 additions & 2 deletions apps/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"k8s.io/apimachinery/pkg/util/yaml"
)

const defaultCassandraImage = "registry.axonops.com/axonops-public/axonops-docker/cassandra"
const defaultCassandraTag = "4.1"
const defaultCassandraImage = "ghcr.io/axonops/cassandra"
const defaultCassandraTag = "5.0.2"

const cassandraHeadlessServiceTemplate = `
apiVersion: v1
Expand Down Expand Up @@ -145,6 +145,7 @@ spec:
containers:
- name: cassandra
image: {{ .Image }}
imagePullPolicy: {{ .PullPolicy }}
ports:
- containerPort: 9042
name: cql
Expand Down Expand Up @@ -289,6 +290,7 @@ type CassandraConfig struct {
MemoryLimit string
CpuRequest string
MemoryRequest string
PullPolicy string
}

func GenerateCassandraConfig(cfg cassandraaxonopscomv1beta1.AxonOpsCassandra) (*appsv1.StatefulSet, error) {
Expand All @@ -312,6 +314,7 @@ func GenerateCassandraConfig(cfg cassandraaxonopscomv1beta1.AxonOpsCassandra) (*
MemoryRequest: utils.ValueOrDefault(cfg.Spec.Cassandra.Resources.Requests.Memory().String(), "1Gi"),
CpuLimit: utils.ValueOrDefault(cfg.Spec.Cassandra.Resources.Limits.Cpu().String(), "1000m"),
MemoryLimit: utils.ValueOrDefault(cfg.Spec.Cassandra.Resources.Limits.Memory().String(), "2Gi"),
PullPolicy: utils.ValueOrDefault(cfg.Spec.Cassandra.PullPolicy, "IfNotPresent"),
}

statefulSet := &appsv1.StatefulSet{}
Expand Down
4 changes: 2 additions & 2 deletions charts/axonops-developer-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ kubeVersion: ">= 1.24.0-0"
type: application

# Chart version
version: 0.2.0
version: 0.2.1

# Latest container tag
appVersion: v0.1.0-beta1
appVersion: v0.1.0

maintainers:
- email: [email protected]
Expand Down
Loading

0 comments on commit 39e3985

Please sign in to comment.