From 48b8070a79e5f8f12559d518463c876363965d96 Mon Sep 17 00:00:00 2001 From: ukff <110393214+ukff@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:56:22 +0100 Subject: [PATCH] wip --- .gitignore | 2 - Makefile | 2 +- config/manager/kustomization.yaml | 4 +- module-resources/apply/rbac.yml | 13 -- scripts/testing/yaml/roles.yaml | 23 --- tests/btp-manager.yaml | 301 ------------------------------ 6 files changed, 3 insertions(+), 342 deletions(-) delete mode 100644 scripts/testing/yaml/roles.yaml delete mode 100644 tests/btp-manager.yaml diff --git a/.gitignore b/.gitignore index 46729e2c8..2c910decc 100644 --- a/.gitignore +++ b/.gitignore @@ -41,8 +41,6 @@ vendor/** /temp/ /charts/ -/bin/f - /vendor debug.sh \ No newline at end of file diff --git a/Makefile b/Makefile index 31f0fab29..2f709ef8a 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ MANIFEST_FILE=btp-manager.yaml # Image URL to use all building/pushing image targets IMG_REGISTRY_PORT ?= 5001 IMG_REGISTRY ?= k3d-kyma-registry:$(IMG_REGISTRY_PORT) -IMG ?= europe-docker.pkg.dev/kyma-project/dev/btp-manager:PR-953 +IMG ?= $(IMG_REGISTRY)/btp-manager:$(MODULE_VERSION) COMPONENT_CLI_VERSION ?= latest diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index f451c44be..deed35163 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: europe-docker.pkg.dev/kyma-project/dev/btp-manager - newTag: PR-953 + newName: europe-docker.pkg.dev/kyma-project/prod/btp-manager + newTag: 0.0.23-test diff --git a/module-resources/apply/rbac.yml b/module-resources/apply/rbac.yml index d1664156f..d7321e3cd 100644 --- a/module-resources/apply/rbac.yml +++ b/module-resources/apply/rbac.yml @@ -94,19 +94,6 @@ rules: # Source: sap-btp-operator/templates/rbac.yml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole -metadata: - name: sap-btp-operator-metrics-reader -rules: - - resources: - - pods - - namespace - verbs: - - get - - create ---- -# Source: sap-btp-operator/templates/rbac.yml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole metadata: name: sap-btp-operator-proxy-role rules: diff --git a/scripts/testing/yaml/roles.yaml b/scripts/testing/yaml/roles.yaml deleted file mode 100644 index 3bcb319e7..000000000 --- a/scripts/testing/yaml/roles.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: pod-reader - namespace: default -rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "list", "watch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: read-pods - namespace: default -subjects: - - kind: ServiceAccount - name: btp-manager-controller-manager - namespace: kyma-system -roleRef: - kind: Role - name: pod-reader - apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/tests/btp-manager.yaml b/tests/btp-manager.yaml deleted file mode 100644 index 2b7069fed..000000000 --- a/tests/btp-manager.yaml +++ /dev/null @@ -1,301 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.16.1 - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btpoperators.operator.kyma-project.io -spec: - group: operator.kyma-project.io - names: - categories: - - kyma-modules - - kyma-btp-operator - kind: BtpOperator - listKind: BtpOperatorList - plural: btpoperators - singular: btpoperator - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.state - name: State - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: BtpOperator is the Schema for the btpoperators API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: BtpOperatorSpec defines the desired state of BtpOperator - nullable: true - type: object - status: - description: Status defines the observed state of CustomObject. - properties: - conditions: - description: Conditions associated with CustomStatus. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - 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 - state: - description: |- - State signifies current state of CustomObject. - Value can be one of ("Ready", "Processing", "Error", "Deleting", "Warning"). - enum: - - Processing - - Deleting - - Ready - - Error - - Warning - type: string - required: - - state - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-controller-manager - namespace: kyma-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-leader-election-role - namespace: kyma-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-manager-role -rules: -- apiGroups: - - "" - resources: - - configmaps - - secrets - - serviceaccounts - - services - verbs: - - '*' -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch -- apiGroups: - - admissionregistration.k8s.io - resources: - - mutatingwebhookconfigurations - - validatingwebhookconfigurations - verbs: - - '*' -- apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - '*' -- apiGroups: - - apps - resources: - - deployments - verbs: - - '*' -- apiGroups: - - operator.kyma-project.io - resources: - - btpoperators - - btpoperators/status - verbs: - - '*' -- apiGroups: - - rbac.authorization.k8s.io - resources: - - clusterrolebindings - - clusterroles - - rolebindings - - roles - verbs: - - '*' -- apiGroups: - - services.cloud.sap.com - resources: - - servicebindings - - serviceinstances - verbs: - - '*' ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-leader-election-rolebinding - namespace: kyma-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: btp-manager-leader-election-role -subjects: -- kind: ServiceAccount - name: btp-manager-controller-manager - namespace: kyma-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: btp-manager-manager-role -subjects: -- kind: ServiceAccount - name: btp-manager-controller-manager - namespace: kyma-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-metrics-service - namespace: kyma-system -spec: - ports: - - name: http - port: 8080 - targetPort: http - selector: - app.kubernetes.io/component: btp-manager.kyma-project.io ---- -apiVersion: scheduling.k8s.io/v1 -description: Scheduling priority of the btp-operator module. Must not be blocked by - unschedulable user workloads. -globalDefault: false -kind: PriorityClass -metadata: - labels: - app.kubernetes.io/component: btp-manager.kyma-project.io - name: btp-manager-kyma-priority -value: 2100000 \ No newline at end of file