Skip to content

Commit

Permalink
Signed-off-by: Gerardo Lopez <gelopfalcongde@gmail.com>
Browse files Browse the repository at this point in the history
update renovate json

Adding mkdocs

[create-pull-request] automated change (k8gb-io#1818)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ytsarev <518532+ytsarev@users.noreply.github.com>

Update CODEOWNERS (k8gb-io#1821)

- Only the last matching rule is applied, so separate rules won't work as expected.
- Keep all owners in a single rule for full repository ownership.
- Comments must be placed above or beside the relevant line.

Signed-off-by: Bradley Andersen <bradley.andersen@pm.me>

Adding Darede to the ADOPTERS list (k8gb-io#1824)

Signed-off-by: Diego Marques <diegodmarques7@gmail.com>

chore(deps): update otel/opentelemetry-collector docker tag to v0.119.0 (k8gb-io#1823)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix(deps): update module github.com/gruntwork-io/terratest to v0.48.2 (k8gb-io#1822)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

[create-pull-request] automated change (k8gb-io#1825)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ytsarev <518532+ytsarev@users.noreply.github.com>

chore(deps): update all non-major dependencies (k8gb-io#1819)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

[create-pull-request] automated change (k8gb-io#1826)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ytsarev <518532+ytsarev@users.noreply.github.com>

Update Non-goals (k8gb-io#1820)

* Update Non-goals
* Fix consistent project name case over the text

Signed-off-by: Yury Tsarev <yury@upbound.io>

Remove SplitBrain implementation (k8gb-io#1829)

- from CRD
- Terratests
- CR, Spec definition
- HelmChart

Signed-off-by: Michal K <kuritka@gmail.com>

ubuntu-20.04 hosted runner image is closing down: bump to 24.04 (k8gb-io#1836)

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

update makefile

update makefile
  • Loading branch information
falconcr committed Mar 5, 2025
1 parent bb79f47 commit 9a3e55f
Show file tree
Hide file tree
Showing 64 changed files with 2,232 additions and 510 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# see: https://golangci-lint.run/usage/configuration/#config-file
- name: golangci-lint
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0
uses: golangci/golangci-lint-action@e60da84bfae8c7920a47be973d75e15710aa8bd7 # v6.3.0
with:
version: v1.63.4
args: --timeout=3m
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -66,7 +66,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/autobuild@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -80,4 +80,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
2 changes: 1 addition & 1 deletion .github/workflows/cut_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions: # added using https://github.com/step-security/secure-workflows

jobs:
cut_release:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kube-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
output-file: ../results/kube-linter.sarif

- name: Upload sarif output to GitHub
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
continue-on-error: true
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
release:
permissions:
contents: write
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
outputs:
container_tags: ${{ steps.container_info.outputs.container_tags }}
container_info: ${{ steps.container_info.outputs.container_info }}
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
sbom:
name: sbom
needs: [release]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
TAGS: "${{ needs.release.outputs.container_tags }}"

Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
provenance:
name: provenance
needs: [release]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
container-provenance:
name: container-provenance
needs: [release]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
permissions:
contents: write

Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
slsa-summary:
name: Release Summary
needs: [sbom, provenance, container-provenance, release]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
TAGS: "${{ needs.release.outputs.container_tags }}"
CONTAINER_INFO: "${{ needs.release.outputs.container_info }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terrascan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
sarif_upload: true
iac_dir: chart/k8gb
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
with:
sarif_file: terrascan.sarif
1 change: 1 addition & 0 deletions ADOPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ This list is sorted in the order that organizations were added to it.
[Eficode](https://eficode.com/) | @punasusi | As a cloud-native and devops consulting firm, we have used k8gb in customer engagements
[Open Systems](https://www.open-systems.com/) | @abaguas | Multi-cluster load balancing in private WAN
[PagBank](https://pagbank.com/) | @altieresfreitas | Multicloud global load balancing across multiple regions
[Darede](https://darede.com.br/) | @diego7marques | As a cloud consulting company, we support customers using k8gb
14 changes: 8 additions & 6 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
* @donovanmuller # Absa Group Ltd
* @k0da # Absa Group Ltd
* @kuritka # Absa Group Ltd
* @ytsarev # Upbound
* @jkremser # Kedify
* @abaguas # Open Systems
# All maintainers
* @donovanmuller @k0da @kuritka @ytsarev @jkremser @abaguas

# Individual affiliations (for reference)
# @donovanmuller @k0da @kuritka - Absa Group Ltd
# @ytsarev - Upbound
# @jkremser - Kedify
# @abaguas - Open Systems
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ website:
git checkout - README.md CONTRIBUTING.md CHANGELOG.md docs/ ;\
$(MAKE) website ;\
fi

.PHONY: version
version:
@echo $(VERSION)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
k8gb is a completely open source, cloud native, global load balancing solution for Kubernetes.
k8gb focuses on load balancing traffic across geographically dispersed Kubernetes clusters using multiple load balancing [strategies](./docs/strategy.md) to meet requirements such as region failover for high availability.
k8gb focuses on load balancing traffic across geographically dispersed Kubernetes clusters using multiple load balancing [strategies](strategy.md) to meet requirements such as region failover for high availability.
Global load balancing for any Kubernetes Service can now be enabled and managed by any operations or development teams in the same Kubernetes native way as any other custom resource.
Expand All @@ -63,7 +63,7 @@ Simply run
make deploy-full-local-setup
```

It will deploy two local [k3s](https://k3s.io/) clusters via [k3d](https://k3d.io/), [expose associated CoreDNS service for UDP DNS traffic](./docs/exposing_dns.md)), and install k8gb with test applications and two sample Gslb resources on top.
It will deploy two local [k3s](https://k3s.io/) clusters via [k3d](https://k3d.io/), [expose associated CoreDNS service for UDP DNS traffic](exposing_dns.md)), and install k8gb with test applications and two sample Gslb resources on top.

This setup is adapted for local scenarios and works without external DNS provider dependency.

Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/gslb_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Strategy struct {
PrimaryGeoTag string `json:"primaryGeoTag,omitempty"`
// Defines DNS record TTL in seconds
DNSTtlSeconds int `json:"dnsTtlSeconds,omitempty"`
// Split brain TXT record expiration in seconds
// Split brain TXT record expiration in seconds. The field is deprecated and not used.
SplitBrainThresholdSeconds int `json:"splitBrainThresholdSeconds,omitempty"`
}

Expand Down
7 changes: 3 additions & 4 deletions chart/k8gb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Kubernetes: `>= 1.19.0-0`

| Repository | Name | Version |
|------------|------|---------|
| https://coredns.github.io/helm | coredns | 1.38.1 |
| https://coredns.github.io/helm | coredns | 1.39.0 |

For Kubernetes `< 1.19` use this chart and k8gb in version `0.8.8` or lower.

Expand Down Expand Up @@ -116,7 +116,6 @@ For Kubernetes `< 1.19` use this chart and k8gb in version `0.8.8` or lower.
| k8gb.securityContext.runAsNonRoot | bool | `true` | For more options consult https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#securitycontext-v1-core |
| k8gb.securityContext.runAsUser | int | `1000` | |
| k8gb.serviceMonitor | object | `{"enabled":false}` | enable ServiceMonitor |
| k8gb.splitBrainCheck | bool | `false` | Enable SplitBrain check (Infoblox only) |
| k8gb.validatingAdmissionPolicy | object | `{"enabled":false}` | enable validating admission policies |
| ns1.enabled | bool | `false` | Enable NS1 provider |
| ns1.ignoreSSL | bool | `false` | optional custom NS1 API endpoint for on-prem setups endpoint: https://api.nsone.net/v1/ |
Expand All @@ -143,9 +142,9 @@ For Kubernetes `< 1.19` use this chart and k8gb in version `0.8.8` or lower.
| tracing.endpoint | string | `"localhost:4318"` | `host:port` where the spans from the applications (traces) should be sent, sets the `OTEL_EXPORTER_OTLP_ENDPOINT` env var This is not the final destination where all the traces are going. Otel collector has its configuration in the associated configmap (`tracing.otelConfig`). |
| tracing.jaegerImage.pullPolicy | string | `"Always"` | |
| tracing.jaegerImage.repository | string | `"jaegertracing/all-in-one"` | if `tracing.deployJaeger==true` this image will be used in the deployment for Jaeger |
| tracing.jaegerImage.tag | string | `"1.65.0"` | |
| tracing.jaegerImage.tag | string | `"1.66.0"` | |
| tracing.otelConfig | string | `nil` | configuration for OTEL collector, this will be represented as configmap called `agent-config` |
| tracing.samplingRatio | string | `nil` | float representing the ratio of how often the span should be kept/dropped (env var `TRACING_SAMPLING_RATIO`) if not specified, the AlwaysSample will be used which is the same as 1.0. `0.1` would mean that 10% of samples will be kept |
| tracing.sidecarImage.pullPolicy | string | `"Always"` | |
| tracing.sidecarImage.repository | string | `"otel/opentelemetry-collector"` | OpenTelemetry collector into which the k8gb operator sends the spans. It can be further configured to send its data to somewhere else using exporters (Jaeger for instance) |
| tracing.sidecarImage.tag | string | `"0.118.0"` | |
| tracing.sidecarImage.tag | string | `"0.119.0"` | |
3 changes: 2 additions & 1 deletion chart/k8gb/crd/k8gb.absa.oss_gslbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ spec:
description: Primary Geo Tag. Valid for failover strategy only
type: string
splitBrainThresholdSeconds:
description: Split brain TXT record expiration in seconds
description: Split brain TXT record expiration in seconds. The
field is deprecated and not used.
type: integer
type:
description: Load balancing strategy type:(roundRobin|failover)
Expand Down
2 changes: 0 additions & 2 deletions chart/k8gb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ spec:
value: {{ quote .Values.k8gb.log.level }}
- name: NO_COLOR
value: "true"
- name: SPLIT_BRAIN_CHECK
value: {{ quote .Values.k8gb.splitBrainCheck }}
- name: METRICS_ADDRESS
value: {{ .Values.k8gb.metricsAddress }}
{{- if .Values.tracing.enabled }}
Expand Down
6 changes: 2 additions & 4 deletions chart/k8gb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ k8gb:
format: simple # log format (simple,json)
# -- log level (panic,fatal,error,warn,info,debug,trace)
level: info # log level (panic,fatal,error,warn,info,debug,trace)
# -- Enable SplitBrain check (Infoblox only)
splitBrainCheck: false
# -- Metrics server address
metricsAddress: "0.0.0.0:8080"
securityContext:
Expand Down Expand Up @@ -237,13 +235,13 @@ tracing:
# -- OpenTelemetry collector into which the k8gb operator sends the spans. It can be further configured to send its data
# to somewhere else using exporters (Jaeger for instance)
repository: otel/opentelemetry-collector
tag: 0.118.0
tag: 0.119.0
pullPolicy: Always

jaegerImage:
# -- if `tracing.deployJaeger==true` this image will be used in the deployment for Jaeger
repository: jaegertracing/all-in-one
tag: 1.65.0
tag: 1.66.0
pullPolicy: Always

istio:
Expand Down
2 changes: 0 additions & 2 deletions controllers/depresolver/depresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ type Config struct {
MetricsAddress string `env:"METRICS_ADDRESS, default=0.0.0.0:8080"`
// extDNSEnabled hidden. EdgeDNSType defines all enabled Enabled types
extDNSEnabled bool `env:"EXTDNS_ENABLED, default=false"`
// SplitBrainCheck flag decides whether split brain TXT records will be stored in edge DNS
SplitBrainCheck bool `env:"SPLIT_BRAIN_CHECK, default=false"`
// TracingEnabled flag decides whether to use a real otlp tracer or a noop one
TracingEnabled bool `env:"TRACING_ENABLED, default=false"`
// TracingSamplingRatio how many traces should be kept and sent (1.0 - all, 0.0 - none)
Expand Down
24 changes: 0 additions & 24 deletions controllers/depresolver/depresolver_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const (
LogLevelKey = "LOG_LEVEL"
LogFormatKey = "LOG_FORMAT"
LogNoColorKey = "NO_COLOR"
SplitBrainCheckKey = "SPLIT_BRAIN_CHECK"
TracingEnabled = "TRACING_ENABLED"
OtelExporterOtlpEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT"
TracingSamplingRatio = "TRACING_SAMPLING_RATIO"
Expand Down Expand Up @@ -383,18 +382,6 @@ func (c *Config) GetClusterNSName() string {
return getNsName(c.ClusterGeoTag, c.DNSZone, c.EdgeDNSZone, c.EdgeDNSServers[0].Host)
}

func (c *Config) GetExternalClusterHeartbeatFQDNs(gslbName string) (m map[string]string) {
m = make(map[string]string, len(c.ExtClustersGeoTags))
for _, tag := range c.ExtClustersGeoTags {
m[tag] = getHeartbeatFQDN(gslbName, tag, c.EdgeDNSZone)
}
return
}

func (c *Config) GetClusterHeartbeatFQDN(gslbName string) string {
return getHeartbeatFQDN(gslbName, c.ClusterGeoTag, c.EdgeDNSZone)
}

// getNsName returns NS for geo tag.
// The values is combination of DNSZone, EdgeDNSZone and (Ext)ClusterGeoTag, see:
// DNS_ZONE k8gb-test.gslb.cloud.example.com
Expand All @@ -412,14 +399,3 @@ func getNsName(tag, dnsZone, edgeDNSZone, edgeDNSServer string) string {
domainX := strings.ReplaceAll(d, ".", "-")
return fmt.Sprintf("%s-%s-%s.%s", prefix, tag, domainX, edgeDNSZone)
}

// getHeartbeatFQDN returns heartbeat for geo tag.
// The values is combination of EdgeDNSZone and (Ext)ClusterGeoTag, and GSLB name see:
// EDGE_DNS_ZONE: cloud.example.com
// CLUSTER_GEOTAG: us
// gslb.Name: test-gslb-1
// will generate "test-gslb-1-heartbeat-us.cloud.example.com"
// The function is private and expects only valid inputs.
func getHeartbeatFQDN(name, geoTag, edgeDNSZone string) string {
return fmt.Sprintf("%s-heartbeat-%s.%s", name, geoTag, edgeDNSZone)
}
10 changes: 1 addition & 9 deletions controllers/depresolver/depresolver_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import (
)

var predefinedStrategy = k8gbv1beta1.Strategy{
DNSTtlSeconds: 30,
SplitBrainThresholdSeconds: 300,
DNSTtlSeconds: 30,
}

// ResolveGslbSpec fills Gslb by spec values. It executes always, when gslb is initialised.
Expand All @@ -44,9 +43,6 @@ func (dr *DependencyResolver) ResolveGslbSpec(ctx context.Context, gslb *k8gbv1b
if gslb.Spec.Strategy.DNSTtlSeconds == 0 {
gslb.Spec.Strategy.DNSTtlSeconds = predefinedStrategy.DNSTtlSeconds
}
if gslb.Spec.Strategy.SplitBrainThresholdSeconds == 0 {
gslb.Spec.Strategy.SplitBrainThresholdSeconds = predefinedStrategy.SplitBrainThresholdSeconds
}
dr.errorSpec = dr.validateSpec(gslb.Spec.Strategy)
if dr.errorSpec == nil {
dr.errorSpec = client.Update(ctx, gslb)
Expand All @@ -61,10 +57,6 @@ func (dr *DependencyResolver) validateSpec(strategy k8gbv1beta1.Strategy) (err e
if err != nil {
return
}
err = field("SplitBrainThresholdSeconds", strategy.SplitBrainThresholdSeconds).isHigherOrEqualToZero().err
if err != nil {
return
}
err = field("Type", strategy.Type).isOneOf(RoundRobinStrategy, GeoStrategy, FailoverStrategy).err
if err != nil {
return
Expand Down
Loading

0 comments on commit 9a3e55f

Please sign in to comment.