diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 382487f..c4ee7bd 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 description: Helm chart to deploy CAP Operator https://sap.github.io/cap-operator/ name: cap-operator -version: 0.35.0 -appVersion: 0.35.0 +version: 0.35.1 +appVersion: 0.35.1 diff --git a/chart/crds/sme.sap.com_capapplications.yaml b/chart/crds/sme.sap.com_capapplications.yaml index b9689ce..8db43b7 100644 --- a/chart/crds/sme.sap.com_capapplications.yaml +++ b/chart/crds/sme.sap.com_capapplications.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: capapplications.sme.sap.com spec: group: sme.sap.com diff --git a/chart/crds/sme.sap.com_capapplicationversions.yaml b/chart/crds/sme.sap.com_capapplicationversions.yaml index bdd2efa..a5b4a40 100644 --- a/chart/crds/sme.sap.com_capapplicationversions.yaml +++ b/chart/crds/sme.sap.com_capapplicationversions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: capapplicationversions.sme.sap.com spec: group: sme.sap.com @@ -1170,6 +1170,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1230,6 +1232,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1274,6 +1278,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -1307,6 +1313,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1381,6 +1389,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -1414,6 +1424,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1605,6 +1617,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -1638,6 +1652,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1699,6 +1715,11 @@ spec: volumeMounts: items: properties: + bindMountOptions: + items: + type: string + type: array + x-kubernetes-list-type: set mountPath: type: string mountPropagation: @@ -1763,6 +1784,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1823,6 +1846,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1867,6 +1892,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -1900,6 +1927,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -1966,8 +1995,8 @@ spec: x-kubernetes-validations: - message: exactly one of the fields in [metrics expression] must be set - rule: '[has(self.metrics),has(self.expression)].filter(x,x==true).size() - == 1' + rule: (has(self.metrics)?1:0)+(has(self.expression)?1:0) + == 1 scrapeConfig: properties: interval: @@ -2149,6 +2178,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -2182,6 +2213,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -2342,6 +2375,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -2375,6 +2410,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -2444,8 +2481,8 @@ spec: - message: at most one of the fields in [httpHeaderName httpCookie useSourceIp httpQueryParameterName] may be set - rule: '[has(self.httpHeaderName),has(self.httpCookie),has(self.useSourceIp),has(self.httpQueryParameterName)].filter(x,x==true).size() - <= 1' + rule: (has(self.httpHeaderName)?1:0)+(has(self.httpCookie)?1:0)+(has(self.useSourceIp)?1:0)+(has(self.httpQueryParameterName)?1:0) + <= 1 type: object terminationGracePeriodSeconds: format: int64 @@ -2525,6 +2562,11 @@ spec: volumeMounts: items: properties: + bindMountOptions: + items: + type: string + type: array + x-kubernetes-list-type: set mountPath: type: string mountPropagation: @@ -2641,6 +2683,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer items: items: properties: @@ -2651,6 +2696,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -2691,6 +2739,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer items: items: properties: @@ -2725,6 +2776,9 @@ spec: - resource type: object x-kubernetes-map-type: atomic + user: + format: int64 + type: integer required: - path type: object @@ -2735,6 +2789,9 @@ spec: properties: medium: type: string + mode: + format: int32 + type: integer sizeLimit: anyOf: - type: integer @@ -3029,6 +3086,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer sources: items: properties: @@ -3068,6 +3128,9 @@ spec: type: string signerName: type: string + user: + format: int64 + type: integer required: - path type: object @@ -3083,6 +3146,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -3132,6 +3198,9 @@ spec: - resource type: object x-kubernetes-map-type: atomic + user: + format: int64 + type: integer required: - path type: object @@ -3153,6 +3222,9 @@ spec: type: integer signerName: type: string + user: + format: int64 + type: integer userAnnotations: additionalProperties: type: string @@ -3173,6 +3245,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -3195,6 +3270,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - path type: object @@ -3292,6 +3370,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer items: items: properties: @@ -3302,6 +3383,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -4059,6 +4143,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -4119,6 +4205,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -4163,6 +4251,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -4196,6 +4286,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -4270,6 +4362,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -4303,6 +4397,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -4494,6 +4590,8 @@ spec: type: integer grpc: properties: + mode: + type: string port: format: int32 type: integer @@ -4527,6 +4625,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -4588,6 +4688,11 @@ spec: volumeMounts: items: properties: + bindMountOptions: + items: + type: string + type: array + x-kubernetes-list-type: set mountPath: type: string mountPropagation: @@ -4652,6 +4757,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -4712,6 +4819,8 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + protocol: + type: string scheme: type: string required: @@ -5018,6 +5127,11 @@ spec: volumeMounts: items: properties: + bindMountOptions: + items: + type: string + type: array + x-kubernetes-list-type: set mountPath: type: string mountPropagation: @@ -5134,6 +5248,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer items: items: properties: @@ -5144,6 +5261,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -5184,6 +5304,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer items: items: properties: @@ -5218,6 +5341,9 @@ spec: - resource type: object x-kubernetes-map-type: atomic + user: + format: int64 + type: integer required: - path type: object @@ -5228,6 +5354,9 @@ spec: properties: medium: type: string + mode: + format: int32 + type: integer sizeLimit: anyOf: - type: integer @@ -5522,6 +5651,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer sources: items: properties: @@ -5561,6 +5693,9 @@ spec: type: string signerName: type: string + user: + format: int64 + type: integer required: - path type: object @@ -5576,6 +5711,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -5625,6 +5763,9 @@ spec: - resource type: object x-kubernetes-map-type: atomic + user: + format: int64 + type: integer required: - path type: object @@ -5646,6 +5787,9 @@ spec: type: integer signerName: type: string + user: + format: int64 + type: integer userAnnotations: additionalProperties: type: string @@ -5666,6 +5810,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -5688,6 +5835,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - path type: object @@ -5785,6 +5935,9 @@ spec: defaultMode: format: int32 type: integer + defaultUser: + format: int64 + type: integer items: items: properties: @@ -5795,6 +5948,9 @@ spec: type: integer path: type: string + user: + format: int64 + type: integer required: - key - path @@ -5858,8 +6014,8 @@ spec: x-kubernetes-validations: - message: exactly one of the fields in [deploymentDefinition jobDefinition] must be set - rule: '[has(self.deploymentDefinition),has(self.jobDefinition)].filter(x,x==true).size() - == 1' + rule: (has(self.deploymentDefinition)?1:0)+(has(self.jobDefinition)?1:0) + == 1 maxItems: 100 type: array required: diff --git a/chart/crds/sme.sap.com_captenantoperations.yaml b/chart/crds/sme.sap.com_captenantoperations.yaml index 9cc97f3..c312cb5 100644 --- a/chart/crds/sme.sap.com_captenantoperations.yaml +++ b/chart/crds/sme.sap.com_captenantoperations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: captenantoperations.sme.sap.com spec: group: sme.sap.com diff --git a/chart/crds/sme.sap.com_captenantoutputs.yaml b/chart/crds/sme.sap.com_captenantoutputs.yaml index 3984042..ddfade8 100644 --- a/chart/crds/sme.sap.com_captenantoutputs.yaml +++ b/chart/crds/sme.sap.com_captenantoutputs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: captenantoutputs.sme.sap.com spec: group: sme.sap.com diff --git a/chart/crds/sme.sap.com_captenants.yaml b/chart/crds/sme.sap.com_captenants.yaml index 324db17..e29577d 100644 --- a/chart/crds/sme.sap.com_captenants.yaml +++ b/chart/crds/sme.sap.com_captenants.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: captenants.sme.sap.com spec: group: sme.sap.com diff --git a/chart/crds/sme.sap.com_clusterdomains.yaml b/chart/crds/sme.sap.com_clusterdomains.yaml index fe10491..56c9ba6 100644 --- a/chart/crds/sme.sap.com_clusterdomains.yaml +++ b/chart/crds/sme.sap.com_clusterdomains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: clusterdomains.sme.sap.com spec: group: sme.sap.com diff --git a/chart/crds/sme.sap.com_domains.yaml b/chart/crds/sme.sap.com_domains.yaml index 57e7a2f..3e174b1 100644 --- a/chart/crds/sme.sap.com_domains.yaml +++ b/chart/crds/sme.sap.com_domains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.21.0 + controller-gen.kubebuilder.io/version: v0.22.0 name: domains.sme.sap.com spec: group: sme.sap.com diff --git a/chart/crds/sme.sap.com_subscriptionproviders.yaml b/chart/crds/sme.sap.com_subscriptionproviders.yaml new file mode 100644 index 0000000..bdb6c02 --- /dev/null +++ b/chart/crds/sme.sap.com_subscriptionproviders.yaml @@ -0,0 +1,67 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.22.0 + name: subscriptionproviders.sme.sap.com +spec: + group: sme.sap.com + names: + kind: SubscriptionProvider + listKind: SubscriptionProviderList + plural: subscriptionproviders + shortNames: + - subpro + singular: subscriptionprovider + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: App + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + appName: + type: string + dependencies: + type: string + providerSubaccountId: + type: string + subscriptionInfo: + properties: + authSecret: + type: string + subscriptionSecret: + type: string + type: + type: string + required: + - subscriptionSecret + - type + type: object + required: + - appName + - providerSubaccountId + - subscriptionInfo + type: object + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: {} diff --git a/chart/crds/sme.sap.com_subscriptions.yaml b/chart/crds/sme.sap.com_subscriptions.yaml new file mode 100644 index 0000000..5bbf396 --- /dev/null +++ b/chart/crds/sme.sap.com_subscriptions.yaml @@ -0,0 +1,132 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.22.0 + name: subscriptions.sme.sap.com +spec: + group: sme.sap.com + names: + kind: Subscription + listKind: SubscriptionList + plural: subscriptions + shortNames: + - sub + singular: subscription + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: App + type: string + - jsonPath: .spec.subscriptionGuid + name: Guid + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.state + name: State + type: string + - jsonPath: .status.url + name: Url + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + appName: + type: string + providerSubaccountId: + type: string + subdomain: + type: string + subscriptionDomain: + type: string + subscriptionGuid: + type: string + subscriptionRequestPayload: + type: string + tenantId: + type: string + required: + - appName + - providerSubaccountId + - subdomain + - subscriptionDomain + - subscriptionGuid + - subscriptionRequestPayload + - tenantId + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + observedGeneration: + format: int64 + type: integer + state: + enum: + - "" + - Ready + - ProcessingError + - Error + - Processing + - Deleting + type: string + url: + type: string + required: + - state + type: object + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/chart/templates/controller-rbac.yaml b/chart/templates/controller-rbac.yaml index bbbc0fa..d0159e3 100644 --- a/chart/templates/controller-rbac.yaml +++ b/chart/templates/controller-rbac.yaml @@ -18,7 +18,7 @@ metadata: operator.sme.sap.com/release: {{.Release.Name}} rules: - apiGroups: ["sme.sap.com"] - resources: ["capapplications", "capapplications/status", "capapplicationversions", "capapplicationversions/status", "captenants", "captenants/status", "captenantoperations", "captenantoperations/status", "captenantoutputs", "domains", "domains/status", "clusterdomains", "clusterdomains/status"] + resources: ["capapplications", "capapplications/status", "capapplicationversions", "capapplicationversions/status", "captenants", "captenants/status", "captenantoperations", "captenantoperations/status", "captenantoutputs", "domains", "domains/status", "clusterdomains", "clusterdomains/status", "subscriptionproviders", "subscriptionproviders/status", "subscriptions", "subscriptions/status"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] - apiGroups: [""] resources: ["secrets", "configmaps", "services"] diff --git a/chart/templates/server-rbac.yaml b/chart/templates/server-rbac.yaml index e5ceaf3..e90a339 100644 --- a/chart/templates/server-rbac.yaml +++ b/chart/templates/server-rbac.yaml @@ -18,14 +18,14 @@ metadata: operator.sme.sap.com/release: {{.Release.Name}} rules: - apiGroups: ["sme.sap.com"] - resources: ["capapplications", "capapplications/status", "captenantoutputs", "domains", "domains/status", "clusterdomains", "clusterdomains/status"] + resources: ["subscriptionproviders", "subscriptionproviders/status", "captenantoutputs"] verbs: ["get", "list", "watch"] - apiGroups: ["sme.sap.com"] - resources: ["captenants", "captenants/status"] + resources: ["subscriptions", "subscriptions/status"] verbs: ["create", "delete", "get", "list", "update", "watch"] - apiGroups: [""] resources: ["secrets"] - verbs: ["create", "get", "update", "list", "watch"] + verbs: ["get", "list", "watch"] - apiGroups: ["", "events.k8s.io"] resources: ["events"] verbs: ["*"] diff --git a/chart/templates/webhook-rbac.yaml b/chart/templates/webhook-rbac.yaml index bb249a0..1e058ed 100644 --- a/chart/templates/webhook-rbac.yaml +++ b/chart/templates/webhook-rbac.yaml @@ -14,7 +14,7 @@ metadata: name: {{.Release.Name}}-webhook rules: - apiGroups: ["sme.sap.com"] - resources: ["capapplications","capapplicationversions", "captenants", "captenantoperations", "captenantoutputs", "domains", "clusterdomains"] + resources: ["capapplications","capapplicationversions", "captenants", "captenantoperations", "captenantoutputs", "domains", "clusterdomains", "subscriptionproviders", "subscriptions"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] --- apiVersion: rbac.authorization.k8s.io/v1