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

feature(provisioner) Add a default mssql provisioner #73

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

Hentouane
Copy link
Contributor

Adding a new default provider for a mssql database.

Description

Created a new default provider template for a mssql db based on already existing mysql and postgres ones. Updated zz-default.provisioners.yaml and README.md.

What does this PR do?

Adding a new default provider for a mssql database per feature request #66

Was tested with the following score.yaml file:

apiVersion: score.dev/v1b1
metadata:
    name: test-container
containers:
    main:
        image: mcr.microsoft.com/mssql-tools
        variables:
            SERVER_NAME: ${resources.db.host}
            MSSQL_SA_USER: ${resources.db.username}
            MSSQL_SA_PASSWORD: ${resources.db.password}
        command:
            - /bin/sh
            - -c
            - /opt/mssql-tools/bin/sqlcmd -S $SERVER_NAME -U $MSSQL_SA_USER -P $MSSQL_SA_PASSWORD -Q "select @@version"
resources:
    db:
        type: mssql

Once deployed in a k3s cluster, the following was succesfully logged by the test-container:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
Microsoft SQL Server 2022 (RTM-CU15-GDR) (KB5046059) - 16.0.4150.1 (X64)                                                                                                                                      
     Sep 25 2024 17:34:41                                                                                                                                                                                      
     Copyright (C) 2022 Microsoft Corporation                                                                                                                                                                  
     Developer Edition (64-bit) on Linux (Ubuntu 22.04.5 LTS) <X64>                                                                                                                                            
                                                                                                                                                                                                               
  (1 rows affected)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

@mathieu-benoit mathieu-benoit self-requested a review October 24, 2024 11:37
@mathieu-benoit mathieu-benoit linked an issue Oct 24, 2024 that may be closed by this pull request
Copy link
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

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

Thanks @Hentouane for your contribution.

I have left a few comments for updates.

Also, you need to sign your commits to be compliant with the DCO check, see here how to resolve it: https://github.com/score-spec/score-k8s/runs/31986670494.

@Hentouane
Copy link
Contributor Author

Commits were signed-off and changes were applied. Leaving one conversation open as to confirm reviewer's approval.

@mathieu-benoit
Copy link
Contributor

Thanks, @Hentouane!

LGTM

@astromechza, another pair of eyes for this review please? Thanks1

Copy link
Member

@astromechza astromechza left a comment

Choose a reason for hiding this comment

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

Yup, this looks good to me! Definitely a good starting point for those using mssql

Thanks @Hentouane 👍

@mathieu-benoit mathieu-benoit merged commit da41f9e into score-spec:main Oct 25, 2024
4 checks passed
@mathieu-benoit mathieu-benoit changed the title feature(provisioner) Add a default mssql provisioner feature(provisioner) Add a default mssql provisioner Nov 3, 2024
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.

[feature request] Add a default mssql provisioner
3 participants