Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
WORKDIR /go/src/github.com/openshift/cluster-osin-operator
WORKDIR /go/src/github.com/openshift/cluster-authentication-operator
COPY . .
RUN go build -o osin-operator ./cmd/osin-operator
RUN go build -o authentication-operator ./cmd/authentication-operator

FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
COPY --from=builder /go/src/github.com/openshift/cluster-osin-operator/osin-operator /usr/bin/
COPY --from=builder /go/src/github.com/openshift/cluster-authentication-operator/authentication-operator /usr/bin/
COPY manifests /manifests
ENTRYPOINT ["/usr/bin/osin-operator"]
ENTRYPOINT ["/usr/bin/authentication-operator"]
LABEL io.k8s.display-name="OpenShift cluster-authentication-operator" \
io.k8s.description="This is a component of OpenShift and manages cluster authentication settings" \
com.redhat.component="cluster-authentication-operator" \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
WORKDIR /go/src/github.com/openshift/cluster-osin-operator
WORKDIR /go/src/github.com/openshift/cluster-authentication-operator
COPY . .
RUN go build -o osin-operator ./cmd/osin-operator
RUN go build -o authentication-operator ./cmd/authentication-operator

FROM registry.svc.ci.openshift.org/ocp/4.0:base
COPY --from=builder /go/src/github.com/openshift/cluster-osin-operator/osin-operator /usr/bin/
COPY --from=builder /go/src/github.com/openshift/cluster-authentication-operator/authentication-operator /usr/bin/
COPY manifests /manifests
ENTRYPOINT ["/usr/bin/osin-operator"]
ENTRYPOINT ["/usr/bin/authentication-operator"]
LABEL io.k8s.display-name="OpenShift cluster-authentication-operator" \
io.k8s.description="This is a component of OpenShift and manages cluster authentication settings" \
com.redhat.component="cluster-authentication-operator" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
utilflag "k8s.io/apiserver/pkg/util/flag"
"k8s.io/apiserver/pkg/util/logs"

"github.com/openshift/cluster-osin-operator/pkg/cmd/operator"
"github.com/openshift/cluster-osin-operator/pkg/cmd/operator2"
"github.com/openshift/cluster-authentication-operator/pkg/cmd/operator"
"github.com/openshift/cluster-authentication-operator/pkg/cmd/operator2"
)

func main() {
Expand All @@ -35,8 +35,8 @@ func main() {

func NewAuthenticationOperatorCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "osin-operator",
Short: "OpenShift osin OAuth server operator",
Use: "authentication-operator",
Short: "OpenShift authentication OAuth server operator",
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package: github.com/openshift/cluster-osin-operator
package: github.com/openshift/cluster-authentication-operator
import:
- package: k8s.io/apimachinery
version: kubernetes-1.11.1
Expand Down
6 changes: 3 additions & 3 deletions hack/lib/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This script provides constants for the Golang binary build process

readonly OS_GO_PACKAGE=github.com/openshift/cluster-osin-operator
readonly OS_GO_PACKAGE=github.com/openshift/cluster-authentication-operator

readonly OS_BUILD_ENV_GOLANG="${OS_BUILD_ENV_GOLANG:-1.9}"
readonly OS_BUILD_ENV_IMAGE="${OS_BUILD_ENV_IMAGE:-openshift/origin-release:golang-${OS_BUILD_ENV_GOLANG}}"
Expand All @@ -25,7 +25,7 @@ readonly OS_GOFLAGS_TAGS="include_gcs include_oss containers_image_openpgp"
readonly OS_IMAGE_COMPILE_BINARIES=( )

readonly OS_CROSS_COMPILE_TARGETS=(
cmd/osin-operator
cmd/authentication-operator
)
readonly OS_CROSS_COMPILE_BINARIES=("${OS_CROSS_COMPILE_TARGETS[@]##*/}")

Expand Down Expand Up @@ -146,5 +146,5 @@ readonly OS_ALL_IMAGES=(
# os::build::images builds all images in this repo.
function os::build::images() {
tag_prefix="${OS_IMAGE_PREFIX:-"openshift/origin"}"
os::build::image "${tag_prefix}-cluster-osin-operator" .
os::build::image "${tag_prefix}-cluster-authentication-operator" .
}
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ verify="${VERIFY:-}"
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh "all" \
github.com/openshift/cluster-osin-operator/pkg/generated github.com/openshift/cluster-osin-operator/pkg/apis \
github.com/openshift/cluster-authentication-operator/pkg/generated github.com/openshift/cluster-authentication-operator/pkg/apis \
authentication:v1alpha1 \
--output-base "$(dirname ${BASH_SOURCE})/../../../.." \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \
Expand Down
14 changes: 14 additions & 0 deletions manifests/0000_09_cluster-authentication-operator_00_roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:openshift:operator:authentication
roleRef:
kind: ClusterRole
name: cluster-admin # TODO fix, this is madness
subjects:
- kind: ServiceAccount
namespace: openshift-authentication-operator
name: openshift-authentication-operator
- kind: ServiceAccount
namespace: openshift-authentication
name: openshift-authentication
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
openshift.io/run-level: "1"
name: openshift-core-operators
openshift.io/run-level: "9"
name: openshift-authentication-operator
---
apiVersion: v1
kind: Namespace
metadata:
labels:
openshift.io/run-level: "9"
name: openshift-osin
name: openshift-authentication
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: openshift-core-operators
name: origin-cluster-osin-operator-config
namespace: openshift-authentication-operator
name: openshift-authentication-operator-config
data:
operator-config.yaml: |
apiVersion: operator.openshift.io/v1alpha1
Expand Down
15 changes: 15 additions & 0 deletions manifests/0000_09_cluster-authentication-operator_04_sa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: openshift-authentication-operator
name: openshift-authentication-operator
labels:
app: openshift-authentication-operator
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: openshift-authentication
name: openshift-authentication
labels:
app: openshift-authentication
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: openshift-core-operators
name: origin-cluster-osin-operator
namespace: openshift-authentication-operator
name: origin-cluster-authentication-operator1
labels:
app: origin-cluster-osin-operator
spec:
Expand All @@ -16,12 +16,12 @@ spec:
labels:
app: origin-cluster-osin-operator
spec:
serviceAccountName: origin-cluster-osin-operator
serviceAccountName: openshift-authentication-operator
containers:
- name: operator
image: quay.io/openshift/origin-cluster-authentication-operator:latest
image: quay.io/openshift/origin-cluster-authentication-operator:v4.0
imagePullPolicy: IfNotPresent
command: ["osin-operator", "operator"]
command: ["authentication-operator", "operator1"]
args:
- "--config=/var/run/configmaps/config/operator-config.yaml"
- "-v=4"
Expand All @@ -32,7 +32,7 @@ spec:
- name: config
configMap:
defaultMode: 440
name: origin-cluster-osin-operator-config
name: openshift-authentication-operator-config
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
Expand All @@ -41,30 +41,34 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: openshift-core-operators
name: origin-cluster-osin-operator2
namespace: openshift-authentication-operator
name: openshift-authentication-operator
labels:
app: origin-cluster-osin-operator2
app: origin-cluster-authentication-operator
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app: origin-cluster-osin-operator2
app: origin-cluster-authentication-operator
template:
metadata:
name: origin-cluster-osin-operator
name: origin-cluster-authentication-operator
labels:
app: origin-cluster-osin-operator2
app: origin-cluster-authentication-operator
spec:
serviceAccountName: origin-cluster-osin-operator
serviceAccountName: openshift-authentication-operator
containers:
- name: operator
image: quay.io/openshift/origin-cluster-authentication-operator:latest
imagePullPolicy: IfNotPresent
command: ["osin-operator", "operator2"]
image: quay.io/openshift/origin-cluster-authentication-operator:v4.0
imagePullPolicy: Always
command: ["authentication-operator", "operator"]
args:
- "--config=/var/run/configmaps/config/operator-config.yaml"
- "-v=4"
resources:
requests:
memory: 50Mi
cpu: 10m
volumeMounts:
- mountPath: /var/run/configmaps/config
name: config
Expand All @@ -82,7 +86,7 @@ spec:
- name: config
configMap:
defaultMode: 440
name: origin-cluster-osin-operator-config
name: openshift-authentication-operator-config
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
Expand Down
11 changes: 0 additions & 11 deletions manifests/0000_09_cluster-osin-operator_00_roles.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions manifests/0000_09_cluster-osin-operator_04_sa.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion manifests/image-references
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spec:
- name: cluster-authentication-operator
from:
kind: DockerImage
name: quay.io/openshift/origin-cluster-authentication-operator:latest
name: quay.io/openshift/origin-cluster-authentication-operator:v4.0
- name: hypershift
from:
kind: DockerImage
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/authentication/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

authv1alpha1 "github.com/openshift/cluster-osin-operator/pkg/apis/authentication/v1alpha1"
authv1alpha1 "github.com/openshift/cluster-authentication-operator/pkg/apis/authentication/v1alpha1"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/authentication/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
operatorsv1alpha1api "github.com/openshift/api/operator/v1alpha1"
)

const GroupName = "authentication.operator.openshift.io"

var (
GroupName = "authentication.operator.openshift.io"
GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install, operatorsv1alpha1api.Install)
// Install is a function which adds this version to a scheme
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/authentication/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ type AuthenticationOperatorConfig struct {
}

type AuthenticationOperatorConfigSpec struct {
v1.OperatorSpec
v1.OperatorSpec `json:",inline"`
}

type AuthenticationOperatorConfigStatus struct {
v1.OperatorStatus
v1.OperatorStatus `json:",inline"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
2 changes: 1 addition & 1 deletion pkg/boilerplate/operator/filter.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package operator

import "github.com/openshift/cluster-osin-operator/pkg/boilerplate/controller"
import "github.com/openshift/cluster-authentication-operator/pkg/boilerplate/controller"

func FilterByNames(names ...string) controller.Filter {
return controller.FilterByNames(nil, names...)
Expand Down
2 changes: 1 addition & 1 deletion pkg/boilerplate/operator/operator.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package operator

import "github.com/openshift/cluster-osin-operator/pkg/boilerplate/controller"
import "github.com/openshift/cluster-authentication-operator/pkg/boilerplate/controller"

type Runner interface {
Run(stopCh <-chan struct{})
Expand Down
2 changes: 1 addition & 1 deletion pkg/boilerplate/operator/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package operator
import (
"k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/openshift/cluster-osin-operator/pkg/boilerplate/controller"
"github.com/openshift/cluster-authentication-operator/pkg/boilerplate/controller"
)

// key is the singleton key shared by all events
Expand Down
2 changes: 1 addition & 1 deletion pkg/boilerplate/operator/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package operator
import (
"k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/openshift/cluster-osin-operator/pkg/boilerplate/controller"
"github.com/openshift/cluster-authentication-operator/pkg/boilerplate/controller"
)

type KeySyncer interface {
Expand Down
11 changes: 4 additions & 7 deletions pkg/cmd/operator/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ package operator
import (
"github.com/spf13/cobra"

"github.com/openshift/cluster-osin-operator/pkg/operator"
"github.com/openshift/cluster-osin-operator/pkg/version"
"github.com/openshift/cluster-authentication-operator/pkg/operator"
"github.com/openshift/cluster-authentication-operator/pkg/version"
"github.com/openshift/library-go/pkg/controller/controllercmd"
)

const (
componentName = "cluster-osin-operator"
componentNamespace = "openshift-core-operators"
)
const componentName = "cluster-osin-operator"

func NewOperator() *cobra.Command {
cmd := controllercmd.NewControllerCommandConfig(componentName, version.Get(), operator.RunOperator).NewCommand()
cmd.Use = "operator"
cmd.Use = "operator1"
cmd.Short = "Start the Osin Operator"
return cmd
}
13 changes: 5 additions & 8 deletions pkg/cmd/operator2/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ package operator2
import (
"github.com/spf13/cobra"

"github.com/openshift/cluster-osin-operator/pkg/operator2"
"github.com/openshift/cluster-osin-operator/pkg/version"
"github.com/openshift/cluster-authentication-operator/pkg/operator2"
"github.com/openshift/cluster-authentication-operator/pkg/version"
"github.com/openshift/library-go/pkg/controller/controllercmd"
)

const (
componentName = "cluster-osin-operator2"
componentNamespace = "openshift-core-operators"
)
const componentName = "cluster-authentication-operator"

func NewOperator() *cobra.Command {
cmd := controllercmd.NewControllerCommandConfig(componentName, version.Get(), operator2.RunOperator).NewCommand()
cmd.Use = "operator2"
cmd.Short = "Start the Osin Operator2" // temp names and such
cmd.Use = "operator"
cmd.Short = "Start the Authentication Operator"
return cmd
}
2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/clientset.go

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

Loading