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

Feat: K8 operator authentication methods #1954

Merged
merged 31 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7b444e9
Helm
DanielHougaard Jun 11, 2024
b7f5fa2
Types
DanielHougaard Jun 11, 2024
70e0228
Update zz_generated.deepcopy.go
DanielHougaard Jun 12, 2024
d20b897
Update secrets.infisical.com_infisicalsecrets.yaml
DanielHougaard Jun 12, 2024
8964470
Update sample.yaml
DanielHougaard Jun 12, 2024
c3f7c1d
Install Infisical Go SDK
DanielHougaard Jun 12, 2024
32dd478
Fix: Local ETag computation
DanielHougaard Jun 12, 2024
928d5a5
Delete machine-identity-token.go
DanielHougaard Jun 12, 2024
cc81197
Feat: Implementation of Go SDK
DanielHougaard Jun 12, 2024
1eae7d0
Feat: Full auth method support
DanielHougaard Jun 12, 2024
9197530
Docs
DanielHougaard Jun 12, 2024
9977329
add sample resources for k8s auth
maidul98 Jun 12, 2024
bd6a89f
Feat: Improved authentication handler
DanielHougaard Jun 13, 2024
b94db5d
Standalone infisical SDK instance
DanielHougaard Jun 13, 2024
a70043b
Conditioning
DanielHougaard Jun 13, 2024
cf5e367
Update SDK
DanielHougaard Jun 13, 2024
4f38352
Create auth.go
DanielHougaard Jun 13, 2024
5aadc41
Feat: Resource Variables
DanielHougaard Jun 13, 2024
023a0d9
Fix: Kubernetes native auth
DanielHougaard Jun 13, 2024
a9ce378
Helm
DanielHougaard Jun 13, 2024
c63d57f
Generated
DanielHougaard Jun 13, 2024
7057d39
Fix: Naming convention
DanielHougaard Jun 13, 2024
e600b68
Docs: Updated kubernetes
DanielHougaard Jun 13, 2024
68818be
Update infisicalsecret_helper.go
DanielHougaard Jun 13, 2024
df71ecf
uppercase for constants
maidul98 Jun 13, 2024
3472be4
Fix: Only add finalizer if not marked for deletion
DanielHougaard Jun 13, 2024
068eb92
Merge branch 'daniel/k8-operator-go-sdk' of https://github.com/Infisi…
DanielHougaard Jun 13, 2024
fe6e5e0
nits: update logs format
maidul98 Jun 13, 2024
3947e3d
Helm versioning
DanielHougaard Jun 13, 2024
7edcf5f
Merge branch 'daniel/k8-operator-go-sdk' of https://github.com/Infisi…
DanielHougaard Jun 13, 2024
2605987
Helm versioning
DanielHougaard Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
357 changes: 323 additions & 34 deletions docs/integrations/platforms/kubernetes.mdx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions helm-charts/secrets-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v0.5.2
version: v0.6.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.5.2"
appVersion: "v0.6.0"
129 changes: 129 additions & 0 deletions helm-charts/secrets-operator/templates/infisicalsecret-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,135 @@ spec:
properties:
authentication:
properties:
awsIamAuth:
properties:
identityId:
type: string
secretsScope:
properties:
envSlug:
type: string
projectSlug:
type: string
recursive:
type: boolean
secretsPath:
type: string
required:
- envSlug
- projectSlug
- secretsPath
type: object
required:
- identityId
- secretsScope
type: object
azureAuth:
properties:
identityId:
type: string
secretsScope:
properties:
envSlug:
type: string
projectSlug:
type: string
recursive:
type: boolean
secretsPath:
type: string
required:
- envSlug
- projectSlug
- secretsPath
type: object
required:
- identityId
- secretsScope
type: object
gcpIamAuth:
properties:
identityId:
type: string
secretsScope:
properties:
envSlug:
type: string
projectSlug:
type: string
recursive:
type: boolean
secretsPath:
type: string
required:
- envSlug
- projectSlug
- secretsPath
type: object
serviceAccountKeyFilePath:
type: string
required:
- identityId
- secretsScope
- serviceAccountKeyFilePath
type: object
gcpIdTokenAuth:
properties:
identityId:
type: string
secretsScope:
properties:
envSlug:
type: string
projectSlug:
type: string
recursive:
type: boolean
secretsPath:
type: string
required:
- envSlug
- projectSlug
- secretsPath
type: object
required:
- identityId
- secretsScope
type: object
kubernetesAuth:
properties:
identityId:
type: string
secretsScope:
properties:
envSlug:
type: string
projectSlug:
type: string
recursive:
type: boolean
secretsPath:
type: string
required:
- envSlug
- projectSlug
- secretsPath
type: object
serviceAccountRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
required:
- identityId
- secretsScope
- serviceAccountRef
type: object
serviceAccount:
properties:
environmentName:
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/secrets-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ controllerManager:
- ALL
image:
repository: infisical/kubernetes-operator
tag: v0.5.2 # fixed to prevent accidental upgrade
tag: v0.6.0
resources:
limits:
cpu: 500m
Expand Down
61 changes: 61 additions & 0 deletions k8-operator/api/v1alpha1/infisicalsecret_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ type Authentication struct {
ServiceToken ServiceTokenDetails `json:"serviceToken"`
// +kubebuilder:validation:Optional
UniversalAuth UniversalAuthDetails `json:"universalAuth"`
// +kubebuilder:validation:Optional
KubernetesAuth KubernetesAuthDetails `json:"kubernetesAuth"`
// +kubebuilder:validation:Optional
AwsIamAuth AWSIamAuthDetails `json:"awsIamAuth"`
// +kubebuilder:validation:Optional
AzureAuth AzureAuthDetails `json:"azureAuth"`
// +kubebuilder:validation:Optional
GcpIdTokenAuth GCPIdTokenAuthDetails `json:"gcpIdTokenAuth"`
// +kubebuilder:validation:Optional
GcpIamAuth GcpIamAuthDetails `json:"gcpIamAuth"`
}

type UniversalAuthDetails struct {
Expand All @@ -20,6 +30,57 @@ type UniversalAuthDetails struct {
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
}

type KubernetesAuthDetails struct {
// +kubebuilder:validation:Required
IdentityID string `json:"identityId"`
// +kubebuilder:validation:Required
ServiceAccountRef KubernetesServiceAccountRef `json:"serviceAccountRef"`

// +kubebuilder:validation:Required
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
}

type KubernetesServiceAccountRef struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
// +kubebuilder:validation:Required
Namespace string `json:"namespace"`
}

type AWSIamAuthDetails struct {
// +kubebuilder:validation:Required
IdentityID string `json:"identityId"`

// +kubebuilder:validation:Required
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
}

type AzureAuthDetails struct {
// +kubebuilder:validation:Required
IdentityID string `json:"identityId"`

// +kubebuilder:validation:Required
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
}

type GCPIdTokenAuthDetails struct {
// +kubebuilder:validation:Required
IdentityID string `json:"identityId"`

// +kubebuilder:validation:Required
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
}

type GcpIamAuthDetails struct {
// +kubebuilder:validation:Required
IdentityID string `json:"identityId"`
// +kubebuilder:validation:Required
ServiceAccountKeyFilePath string `json:"serviceAccountKeyFilePath"`

// +kubebuilder:validation:Required
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
}

type ServiceTokenDetails struct {
// +kubebuilder:validation:Required
ServiceTokenSecretReference KubeSecretReference `json:"serviceTokenSecretReference"`
Expand Down
101 changes: 101 additions & 0 deletions k8-operator/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading