sigs.k8s.io/cluster-api-provider-aws@v1.5.5/pkg/eks/identityprovider/types.go (about) 1 /* 2 Copyright 2021 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package identityprovider 18 19 import ( 20 "github.com/google/go-cmp/cmp" 21 22 infrav1 "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1" 23 ) 24 25 // OidcIdentityProviderConfig represents the configuration for an OpenID Connect (OIDC) 26 // identity provider. 27 type OidcIdentityProviderConfig struct { 28 ClientID string 29 GroupsClaim *string 30 GroupsPrefix *string 31 IdentityProviderConfigArn *string 32 IdentityProviderConfigName string 33 IssuerURL string 34 RequiredClaims map[string]*string 35 Status *string 36 Tags infrav1.Tags 37 UsernameClaim *string 38 UsernamePrefix *string 39 } 40 41 func (o *OidcIdentityProviderConfig) IsEqual(other *OidcIdentityProviderConfig) bool { 42 if o == other { 43 return true 44 } 45 46 if !cmp.Equal(o.ClientID, other.ClientID) { 47 return false 48 } 49 50 if !cmp.Equal(o.GroupsClaim, other.GroupsClaim) { 51 return false 52 } 53 54 if !cmp.Equal(o.GroupsPrefix, other.GroupsPrefix) { 55 return false 56 } 57 58 if !cmp.Equal(o.IdentityProviderConfigName, other.IdentityProviderConfigName) { 59 return false 60 } 61 62 if !cmp.Equal(o.IssuerURL, other.IssuerURL) { 63 return false 64 } 65 66 if !cmp.Equal(o.RequiredClaims, other.RequiredClaims) { 67 return false 68 } 69 70 if !cmp.Equal(o.UsernameClaim, other.UsernameClaim) { 71 return false 72 } 73 74 if !cmp.Equal(o.UsernamePrefix, other.UsernamePrefix) { 75 return false 76 } 77 78 return true 79 }