Skip to content

Commit

Permalink
CSV: Add annotations into StrategyDeploymentSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
hongkailiu committed Jul 2, 2024
1 parent ce8a923 commit 7601bc5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
11 changes: 10 additions & 1 deletion crds/operators.coreos.com_clusterserviceversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,21 @@ spec:
deployments:
type: array
items:
description: StrategyDeploymentSpec contains the name, spec and labels for the deployment ALM should create
description: StrategyDeploymentSpec contains the name, spec, annotations and labels for the deployment ALM should create
type: object
required:
- name
- spec
properties:
annotations:
description: |-
Annotations is an unstructured key value map stored with a resource that may
be set by external tools to store and retrieve arbitrary metadata. They are
not queryable and should be preserved when modifying objects. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
type: object
additionalProperties:
type: string
label:
description: Set is a map of label:value. It implements Labels.
type: object
Expand Down
2 changes: 1 addition & 1 deletion crds/zz_defs.go

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion pkg/operators/v1alpha1/clusterserviceversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,17 @@ type StrategyDeploymentPermissions struct {
Rules []rbac.PolicyRule `json:"rules"`
}

// StrategyDeploymentSpec contains the name, spec and labels for the deployment ALM should create
// StrategyDeploymentSpec contains the name, spec, annotations and labels for the deployment ALM should create
// +k8s:openapi-gen=true
type StrategyDeploymentSpec struct {
Name string `json:"name"`
Spec appsv1.DeploymentSpec `json:"spec"`
Label labels.Set `json:"label,omitempty"`
// Annotations is an unstructured key value map stored with a resource that may
// be set by external tools to store and retrieve arbitrary metadata. They are
// not queryable and should be preserved when modifying objects. More info:
// https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
Annotations map[string]string `json:"annotations,omitempty"`
}

// StrategyDetailsDeployment represents the parsed details of a Deployment
Expand Down
7 changes: 7 additions & 0 deletions pkg/operators/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 7601bc5

Please sign in to comment.