crossplane-contrib / provider-gitlab

Crossplane Gitlab provider
Apache License 2.0
54 stars 26 forks source link

Nothing happens when creating project from template #129

Closed rlisewski closed 4 months ago

rlisewski commented 4 months ago

What happened?

When creating project from template there are no events and nothing happens. User creating resources is owner of both group (with template and where new project should appear). Gitlab is 16.9.1 Premium (formerly EE). It is possible to create subgroups with the same token/user.

How can we reproduce it?

kubectl apply -f - <<EOF
apiVersion: projects.gitlab.crossplane.io/v1alpha1
kind: Project
metadata:
  name: crossplane-project-from-template-test-service
spec:
  forProvider:
    description: example project from template description
    name: Example Project From Template
    namespaceIdRef:
      name: group_with_projects/subgroup # group to create project in
    visibility: internal
    groupWithProjectTemplatesId: 241 # group ID of templates
    useCustomTemplate: true
    templateName: service-template # template's name
  providerConfigRef:
    name: gitlab-config
  writeConnectionSecretToRef:
    name: crossplane-test-project-from-template-secret
    namespace: crossplane-system
EOF
kubectl get project.projects.gitlab.crossplane.io 
NAME                                            READY   SYNCED   AGE   PATH WITH NAMESPACE
crossplane-project-from-template-test-service                    21m   
kubectl describe project.projects.gitlab.crossplane.io crossplane-project-from-template-test-service
Name:         crossplane-project-from-template-test-service
Namespace:    
Labels:       <none>
Annotations:  <none>
API Version:  projects.gitlab.crossplane.io/v1alpha1
Kind:         Project
Metadata:
  Creation Timestamp:  2024-02-27T14:06:56Z
  Generation:          1
  Resource Version:    93297893
  UID:                 1196b17d-0ca2-46ba-9b7d-ed71ac2164f1
Spec:
  Deletion Policy:  Delete
  For Provider:
    Description:                      example project from template description
    Group With Project Templates Id:  241
    Name:                             Example Project From Template
    Namespace Id Ref:
      Name:               group_with_projects/subgroup
    Template Name:        service-template
    Use Custom Template:  true
    Visibility:           internal
  Management Policies:
    *
  Provider Config Ref:
    Name:  gitlab-config
  Write Connection Secret To Ref:
    Name:       crossplane-test-project-from-template-secret
    Namespace:  crossplane-system
Events:         <none>

What environment did it happen in?

Crossplane version:

NAME            NAMESPACE               REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
crossplane      crossplane-system       6               2024-02-23 11:46:25.162938915 +0100 CET deployed        crossplane-1.15.0       1.15.0  

Crossplane Provider GitLab version:

NAME     INSTALLED   HEALTHY   PACKAGE                                                     AGE
gitlab   True        True      xpkg.upbound.io/crossplane-contrib/provider-gitlab:v0.6.0   5d
MisterMX commented 4 months ago

Duplicate of https://github.com/crossplane-contrib/provider-gitlab/issues/123. Please try version v0.6.1.

rlisewski commented 4 months ago

thanks, it's working