Skip to content

Commit 2caeb7d

Browse files
authored
Release 1.0.0 (#25)
* make release * update test
1 parent 4ce6c66 commit 2caeb7d

File tree

6 files changed

+27
-21
lines changed

6 files changed

+27
-21
lines changed

.github/workflows/test-build-update-helm.yaml

+8-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222

2323
jobs:
2424
test:
25-
runs-on: ubuntu-22.04
25+
runs-on: ubuntu-24.04
2626

2727
steps:
2828
- name: Checkout code
@@ -48,7 +48,7 @@ jobs:
4848
run: make test
4949

5050
validate-build:
51-
runs-on: ubuntu-22.04
51+
runs-on: ubuntu-24.04
5252

5353
steps:
5454
- name: Checkout code
@@ -66,7 +66,7 @@ jobs:
6666
run: make build
6767

6868
validate-image-build:
69-
runs-on: ubuntu-22.04
69+
runs-on: ubuntu-24.04
7070

7171
steps:
7272
- name: Checkout code
@@ -80,7 +80,7 @@ jobs:
8080
permissions:
8181
contents: read
8282
packages: write
83-
runs-on: ubuntu-22.04
83+
runs-on: ubuntu-24.04
8484
if: github.ref == 'refs/heads/main'
8585
needs:
8686
- test
@@ -130,7 +130,7 @@ jobs:
130130
git push --tags
131131
132132
helm-update:
133-
runs-on: ubuntu-22.04
133+
runs-on: ubuntu-24.04
134134
if: github.ref == 'refs/heads/main'
135135
needs:
136136
- build-push-image
@@ -153,10 +153,6 @@ jobs:
153153
run: |
154154
sed -i 's/tag: .*/tag: \"${{ github.run_id }}\"/' charts/fga-operator/values.yaml
155155
156-
- name: Update Chart.yaml version
157-
run: |
158-
sed -i -E 's/(version: [0-9]+\.[0-9]+\.[0-9]+).*/\1-${{ github.run_id }}/' charts/fga-operator/Chart.yaml
159-
160156
- name: Commit updated files
161157
run: |
162158
git add charts/fga-operator/values.yaml charts/fga-operator/Chart.yaml
@@ -167,7 +163,7 @@ jobs:
167163
git push origin HEAD:${{ env.BRANCH }}
168164
169165
helm-release:
170-
runs-on: ubuntu-22.04
166+
runs-on: ubuntu-24.04
171167
if: github.ref == 'refs/heads/main'
172168
permissions:
173169
contents: write
@@ -213,7 +209,7 @@ jobs:
213209
contents: read
214210
packages: read
215211
security-events: write
216-
runs-on: ubuntu-22.04
212+
runs-on: ubuntu-24.04
217213
needs:
218214
- build-push-image
219215

@@ -260,7 +256,7 @@ jobs:
260256
scan-repo:
261257
permissions:
262258
security-events: write
263-
runs-on: ubuntu-22.04
259+
runs-on: ubuntu-24.04
264260

265261
steps:
266262
- name: Checkout repository

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
## [1.0.0] - 2024-10-18
6+
7+
First stable release 🚀
8+
9+
### Changed
10+
- `RECONCILIATION_INTERVAL` now set to 10 s.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ All command line flags has defaults and hence none of them are mandatory.
466466
|-------------------------|---------------------------------------------------------------------------------------------------------------|---------|-----------|-----------------------------------------------------------------------|
467467
| OPENFGA_API_URL | Url to OpenFGA. | - | Yes | "http://127.0.0.1:8089", "http://openfga.demo.svc.cluster.local:8080" |
468468
| OPENFGA_API_TOKEN | Preshared key used for authentication to OpenFGA. | - | Yes | "foobar", "some_token" |
469-
| RECONCILIATION_INTERVAL | The time interval between reconciliation loops, unless an `AuthorizationModelRequest` is created or modified. | "45s" | No | "45s", "5m", "3h" |
469+
| RECONCILIATION_INTERVAL | The time interval between reconciliation loops, unless an `AuthorizationModelRequest` is created or modified. | "10s" | No | "45s", "5m", "3h" |
470470

471471

472472
## Events

charts/fga-operator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ description: |
55
The operator manages and automates the deployment and reference of OpenFGA
66
resources like stores and authroization models.
77
type: application
8-
version: 0.1.0-11408839528
8+
version: 1.0.0
99
appVersion: "0.1.0"

operator/internal/configurations/env.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ import (
88
)
99

1010
const ReconciliationInterval = "RECONCILIATION_INTERVAL"
11+
const DefaultReconciliationInterval = 10 * time.Second
1112

1213
func GetReconciliationInterval(setupLog logr.Logger) time.Duration {
13-
defaultDuration := 45 * time.Second
1414
reconciliationInterval := os.Getenv(ReconciliationInterval)
1515

1616
if reconciliationInterval == "" {
17-
setupLog.Info(fmt.Sprintf("%s not set, using default", ReconciliationInterval), "defaultDuration", defaultDuration)
18-
return defaultDuration
17+
setupLog.Info(fmt.Sprintf("%s not set, using default", ReconciliationInterval), "defaultDuration", DefaultReconciliationInterval)
18+
return DefaultReconciliationInterval
1919
}
2020

2121
requeueAfter, err := time.ParseDuration(reconciliationInterval)
2222
if err != nil {
23-
setupLog.Error(err, fmt.Sprintf("Invalid %s value, using default", ReconciliationInterval), "reconciliationInterval", reconciliationInterval, "defaultDuration", defaultDuration)
24-
return defaultDuration
23+
setupLog.Error(err, fmt.Sprintf("Invalid %s value, using default", ReconciliationInterval), "reconciliationInterval", reconciliationInterval, "defaultDuration", DefaultReconciliationInterval)
24+
return DefaultReconciliationInterval
2525
}
2626

2727
setupLog.Info(fmt.Sprintf("Using %s from environment", ReconciliationInterval), "requeueAfter", requeueAfter)

operator/internal/configurations/env_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestGetRequeueAfterFromEnv(t *testing.T) {
2323
description string
2424
}{
2525
// Test case with no environment variable set (default value should be used)
26-
{"", 45 * time.Second, fmt.Sprintf("%s not set, expect default value of 45 seconds", ReconciliationInterval)},
26+
{"", DefaultReconciliationInterval, fmt.Sprintf("%s not set, expect default value", ReconciliationInterval)},
2727

2828
// Test case with valid second values
2929
{"30s", 30 * time.Second, fmt.Sprintf("%s set to 30 seconds", ReconciliationInterval)},
@@ -38,7 +38,7 @@ func TestGetRequeueAfterFromEnv(t *testing.T) {
3838
{"3h", 3 * time.Hour, fmt.Sprintf("%s set to 3 hours", ReconciliationInterval)},
3939

4040
// Test case with invalid value (default should be used)
41-
{"invalid-value", 45 * time.Second, fmt.Sprintf("%s set to invalid value, expect default value of 45 seconds", ReconciliationInterval)},
41+
{"invalid-value", DefaultReconciliationInterval, fmt.Sprintf("%s set to invalid value, expect default value", ReconciliationInterval)},
4242
}
4343

4444
// Iterate over each test case

0 commit comments

Comments
 (0)