Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example manifests for v1beta2 version #746

Merged

Conversation

sergenyalcin
Copy link
Collaborator

@sergenyalcin sergenyalcin commented May 20, 2024

Description of your changes

This PR depends on #733.

This PR adds example manifests for v1beta2 version.

In this PR, for converting the example manifests, we used the following library: crossplane/upjet#397. For running this library, we need to add a main.go to the provider. Because of this is a one time work, we do not want to merge this converter to provider. However, for being reference we pushed and removed as commits for users: eae946f

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sergenyalcin, lgtm. Let's point to the commit in the PR description that contains the manifest converter utility for future reference.

@sergenyalcin sergenyalcin merged commit 4b96be8 into crossplane-contrib:main May 21, 2024
11 checks passed
@sergenyalcin sergenyalcin deleted the add-v1beta2-examples branch May 21, 2024 16:04
@turkenf
Copy link
Collaborator

turkenf commented May 22, 2024

Upgrade Test

spec:
  deletionPolicy: Delete
  forProvider:
    capacity: 1
    enableNonSslPort: false
    family: P
    location: West Europe
    minimumTlsVersion: "1.2"
    publicNetworkAccessEnabled: true
    redisConfiguration:
    - maxmemoryDelta: 2
      maxmemoryPolicy: allkeys-lru
      maxmemoryReserved: 2
    redisVersion: "6"
    resourceGroupName: example-redis-ftest
    resourceGroupNameRef:
      name: example-redis-ftest
    resourceGroupNameSelector:
      matchLabels:
        testing.upbound.io/example-name: example
    skuName: Premium
  • Edited the package with package: xpkg.upbound.io/upbound/provider-azure:v1.2.0-rc.0.44.g0c238cea8
NAME             INSTALLED   HEALTHY   PACKAGE                                                            AGE
provider-azure   True        True      xpkg.upbound.io/upbound/provider-azure:v1.2.0-rc.0.44.g0c238cea8   125m
  • and we can see the following outputs from get -o yaml
    • apiVersion:
    apiVersion: cache.azure.upbound.io/v1beta2
    
    • as an object redisConfiguration:
     spec:
       deletionPolicy: Delete
       forProvider:
         capacity: 1
         enableNonSslPort: false
         family: P
         location: West Europe
         minimumTlsVersion: "1.2"
         publicNetworkAccessEnabled: true
         redisConfiguration:
           maxmemoryDelta: 2
           maxmemoryPolicy: allkeys-lru
           maxmemoryReserved: 2
         redisVersion: "6"
         resourceGroupName: example-redis-ftest
         resourceGroupNameRef:
           name: example-redis-ftest
         resourceGroupNameSelector:
           matchLabels:
             testing.upbound.io/example-name: example
         skuName: Premium
    

Upgrade test successful

Downgrade Test

  • Installed the xpkg.upbound.io/upbound/provider-azure:v1.2.0-rc.0.44.g0c238cea8
  • Applied the examples/cache/v1beta2/rediscache.yaml
  • We can see the embedded object (redisConfiguration) in get -o yaml output:
spec:
  deletionPolicy: Delete
  forProvider:
    capacity: 1
    enableNonSslPort: false
    family: P
    location: West Europe
    minimumTlsVersion: "1.2"
    publicNetworkAccessEnabled: true
    redisConfiguration:
      maxmemoryDelta: 2
      maxmemoryPolicy: allkeys-lru
      maxmemoryReserved: 2
    redisVersion: "6"
    resourceGroupName: example-redis-ftest
    resourceGroupNameRef:
      name: example-redis-ftest
    resourceGroupNameSelector:
      matchLabels:
        testing.upbound.io/example-name: example
    skuName: Premium
  • Edited the package with package: xpkg.upbound.io/upbound/provider-azure:v1.1.0
NAME             INSTALLED   HEALTHY   PACKAGE                                         AGE
provider-azure   True        True      xpkg.upbound.io/upbound/provider-azure:v1.1.0   34m
  • and we can see the following outputs from get -o yaml
    • apiVersion:
    apiVersion: cache.azure.upbound.io/v1beta1
    
    • singleton list:
    spec:
     deletionPolicy: Delete
     forProvider:
       capacity: 1
       enableNonSslPort: false
       family: P
       location: West Europe
       minimumTlsVersion: "1.2"
       publicNetworkAccessEnabled: true
       redisConfiguration:
       - maxmemoryDelta: 2
         maxmemoryPolicy: allkeys-lru
         maxmemoryReserved: 2
       redisVersion: "6"
       resourceGroupName: example-redis-ftest
       resourceGroupNameRef:
         name: example-redis-ftest
       resourceGroupNameSelector:
         matchLabels:
           testing.upbound.io/example-name: example
       skuName: Premium
    
> kubectl delete managed --all
resourcegroup.azure.upbound.io "example-redis-ftest" deleted
rediscache.cache.azure.upbound.io "ftest-embedded2" deleted

Downgrade test successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants