Skip to content

Commit

Permalink
chore: remove annotations from labels (#35)
Browse files Browse the repository at this point in the history
* chore: new cluster updates

* chore: cluster alias

* chore: remove annotations from labels
  • Loading branch information
avatxus authored Aug 29, 2023
1 parent 2670716 commit 9527721
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 4 additions & 2 deletions operator/src/backend-with-storage/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function updateResource(
// patch resource
const patchBody = {
metadata: {
labels: {
annotations: {
...spec.annotations,
},
},
Expand Down Expand Up @@ -263,7 +263,9 @@ function sts(
labels: {
'demeter.run/version': owner.apiVersion!.split('/')[1],
'demeter.run/kind': owner.kind!,
...spec.annotations,
},
annotations: {
...spec.annotations
},
ownerReferences: [
{
Expand Down
6 changes: 4 additions & 2 deletions operator/src/backend/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function updateResource(
// patch resource
const patchBody = {
metadata: {
labels: {
annotations: {
...spec.annotations,
},
ownerReferences: [
Expand Down Expand Up @@ -178,7 +178,9 @@ function deployment(
labels: {
'demeter.run/version': owner.apiVersion!.split('/')[1],
'demeter.run/kind': owner.kind!,
...spec.annotations,
},
annotations: {
...spec.annotations
},
ownerReferences: [
{
Expand Down
4 changes: 3 additions & 1 deletion operator/src/frontend/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function updateResource(ns: string, name: string, spec: Frontend.Sp
// patch resource
const patchBody = {
metadata: {
labels: {
annotations: {
...spec.annotations,
},
},
Expand Down Expand Up @@ -163,6 +163,8 @@ function deployment(
labels: {
'demeter.run/version': owner.apiVersion!.split('/')[1],
'demeter.run/kind': owner.kind!,
},
annotations: {
...spec.annotations,
},
ownerReferences: [
Expand Down
8 changes: 6 additions & 2 deletions operator/src/workspaces/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export async function updateResource(
labels: {
'demeter.run/version': owner.apiVersion!.split('/')[1],
'demeter.run/kind': owner.kind!,
...spec.annotations,
},
annotations: {
...spec.annotations
},
// needed for migration from old wks
ownerReferences: [
Expand Down Expand Up @@ -319,7 +321,9 @@ function sts(
labels: {
'demeter.run/version': owner.apiVersion!.split('/')[1],
'demeter.run/kind': owner.kind!,
...spec.annotations,
},
annotations: {
...spec.annotations
},
ownerReferences: [
{
Expand Down

0 comments on commit 9527721

Please sign in to comment.